diff --git a/fs/btrfs/reflink.c b/fs/btrfs/reflink.c index f4ec06b53aa039ff434ffb14161d190909c104da..06682128d8fae61d978bf3e35b7f7e5356a4ecdf 100644 --- a/fs/btrfs/reflink.c +++ b/fs/btrfs/reflink.c @@ -285,6 +285,11 @@ static int clone_copy_inline_extent(struct inode *dst, ret = btrfs_inode_set_file_extent_range(BTRFS_I(dst), 0, aligned_end); out: if (!ret && !trans) { + /* + * Release path before starting a new transaction so we don't + * hold locks that would confuse lockdep. + */ + btrfs_release_path(path); /* * No transaction here means we copied the inline extent into a * page of the destination inode.