[PATCH] 9p: fix rename return code
authorEric Van Hensbergen <ericvh@gmail.com>
Fri, 26 Jan 2007 08:57:04 +0000 (00:57 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Fri, 26 Jan 2007 21:50:59 +0000 (13:50 -0800)
9p doesn't handle renames between directories -- however, we were returning
EPERM instead of EXDEV when we detected this case.

Signed-off-by: Eric Van Hensbergren <ericvh@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/9p/vfs_inode.c

index 18f26cdfd882792fecc12113c83e129dc7bcab9e..05d30e89ba45104d3232b4c19c00162c09c1666a 100644 (file)
@@ -767,7 +767,7 @@ v9fs_vfs_rename(struct inode *old_dir, struct dentry *old_dentry,
        /* 9P can only handle file rename in the same directory */
        if (memcmp(&olddirfid->qid, &newdirfid->qid, sizeof(newdirfid->qid))) {
                dprintk(DEBUG_ERROR, "old dir and new dir are different\n");
-               retval = -EPERM;
+               retval = -EXDEV;
                goto FreeFcallnBail;
        }