From: Kusanagi Kouichi Date: Thu, 30 Jan 2014 07:32:02 +0000 (+0900) Subject: btrfs: Return EXDEV for cross file system snapshot X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=23ad5b17dce0f09af82c071b26acac35a0ab892b;p=openwrt%2Fstaging%2Fblogic.git 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: David Sterba Signed-off-by: Kusanagi Kouichi Signed-off-by: Josef Bacik --- diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 9a9044585da7..a692aad8fa5a 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -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) { btrfs_info(BTRFS_I(src_inode)->root->fs_info, "Snapshot src from another FS"); - ret = -EINVAL; + ret = -EXDEV; } else if (!inode_owner_or_capable(src_inode)) { /* * Subvolume creation is not restricted, but snapshots