diff options
author | Kusanagi Kouichi <slash@ac.auone-net.jp> | 2014-01-30 16:32:02 +0900 |
---|---|---|
committer | Josef Bacik <jbacik@fb.com> | 2014-03-10 15:15:37 -0400 |
commit | 23ad5b17dce0f09af82c071b26acac35a0ab892b (patch) | |
tree | 8da600d6a7d4a586c6b86204d317afad8d6b924f /fs/btrfs/ioctl.c | |
parent | 827463c49f29111efd22148d24c9ca44d648acfa (diff) |
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 <dsterba@suse.cz>
Signed-off-by: Kusanagi Kouichi <slash@ac.auone-net.jp>
Signed-off-by: Josef Bacik <jbacik@fb.com>
Diffstat (limited to 'fs/btrfs/ioctl.c')
-rw-r--r-- | fs/btrfs/ioctl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 9a9044585da..a692aad8fa5 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 |