diff --git a/fs/btrfs/reflink.c b/fs/btrfs/reflink.c index c4f87df5328337f4e2c9662343116cc19b2b282f..eeb66e797e0bf83e83d8df4bf986fcf4a61fa0c0 100644 --- a/fs/btrfs/reflink.c +++ b/fs/btrfs/reflink.c @@ -281,6 +281,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.