diff options
author | Josef Bacik <josef@toxicpanda.com> | 2022-02-18 17:38:13 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2022-03-14 15:13:52 +0300 |
commit | ae460f058e9ff31946cc393bf897fc44483f0876 (patch) | |
tree | 28745636eab4fe82ae4307289a124d027ce3aa8a /fs/btrfs/reflink.c | |
parent | 7eefae6bb1ddeba1df02acd5c6bb6b7c8e0f34d1 (diff) | |
download | linux-ae460f058e9ff31946cc393bf897fc44483f0876.tar.xz |
btrfs: remove the cross file system checks from remap
The sb check is already done in do_clone_file_range, and the mnt check
(which will hopefully go away in a subsequent patch) is done in
ioctl_file_clone(). Remove the check in our code and put an ASSERT() to
make sure it doesn't change underneath us.
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/reflink.c')
-rw-r--r-- | fs/btrfs/reflink.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/btrfs/reflink.c b/fs/btrfs/reflink.c index 03d60db0c5a3..04a88bfe4fcf 100644 --- a/fs/btrfs/reflink.c +++ b/fs/btrfs/reflink.c @@ -781,9 +781,7 @@ static int btrfs_remap_file_range_prep(struct file *file_in, loff_t pos_in, if (btrfs_root_readonly(root_out)) return -EROFS; - if (file_in->f_path.mnt != file_out->f_path.mnt || - inode_in->i_sb != inode_out->i_sb) - return -EXDEV; + ASSERT(inode_in->i_sb == inode_out->i_sb); } /* Don't make the dst file partly checksummed */ |