All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kusanagi Kouichi <slash@ac.auone-net.jp>
To: linux-btrfs@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] btrfs: Return EXDEV for cross file system snapshot
Date: Wed, 8 Jan 2014 19:46:19 +0900	[thread overview]
Message-ID: <52cd2c7c00011d8a00004f4e0000743e400004e23b8c@amlmta033.auone-net.jp> (raw)

EXDEV seems an appropriate error if an operation fails bacause it
crosses file system boundaries.

Signed-off-by: Kusanagi Kouichi <slash@ac.auone-net.jp>
---
 fs/btrfs/ioctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 21da576..15d35cb 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -1544,7 +1544,7 @@ static noinline int btrfs_ioctl_snap_create_transid(struct file *file,
 		if (src_inode->i_sb != file_inode(file)->i_sb) {
 			printk(KERN_INFO "btrfs: Snapshot src from "
 			       "another FS\n");
-			ret = -EINVAL;
+			ret = -EXDEV;
 		} else {
 			ret = btrfs_mksubvol(&file->f_path, name, namelen,
 					     BTRFS_I(src_inode)->root,
-- 
1.8.5.2


             reply	other threads:[~2014-01-08 11:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-08 10:46 Kusanagi Kouichi [this message]
2014-01-08 15:14 ` [PATCH] btrfs: Return EXDEV for cross file system snapshot David Sterba
2014-01-28 15:45 ` Josef Bacik
2014-01-30  7:32 Kusanagi Kouichi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52cd2c7c00011d8a00004f4e0000743e400004e23b8c@amlmta033.auone-net.jp \
    --to=slash@ac.auone-net.jp \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.