Commit 23ad5b17 authored by Kusanagi Kouichi's avatar Kusanagi Kouichi Committed by Josef Bacik

btrfs: Return EXDEV for cross file system snapshot

EXDEV seems an appropriate error if an operation fails bacause it
crosses file system boundaries.
Reviewed-by: default avatarDavid Sterba <dsterba@suse.cz>
Signed-off-by: default avatarKusanagi Kouichi <slash@ac.auone-net.jp>
Signed-off-by: default avatarJosef Bacik <jbacik@fb.com>
parent 827463c4
...@@ -1573,7 +1573,7 @@ static noinline int btrfs_ioctl_snap_create_transid(struct file *file, ...@@ -1573,7 +1573,7 @@ static noinline int btrfs_ioctl_snap_create_transid(struct file *file,
if (src_inode->i_sb != file_inode(file)->i_sb) { if (src_inode->i_sb != file_inode(file)->i_sb) {
btrfs_info(BTRFS_I(src_inode)->root->fs_info, btrfs_info(BTRFS_I(src_inode)->root->fs_info,
"Snapshot src from another FS"); "Snapshot src from another FS");
ret = -EINVAL; ret = -EXDEV;
} else if (!inode_owner_or_capable(src_inode)) { } else if (!inode_owner_or_capable(src_inode)) {
/* /*
* Subvolume creation is not restricted, but snapshots * Subvolume creation is not restricted, but snapshots
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment