From: Eric Van Hensbergen Date: Fri, 26 Jan 2007 08:57:04 +0000 (-0800) Subject: [PATCH] 9p: fix rename return code X-Git-Tag: v2.6.20-rc7~72 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=621997cd392a541bbe964e7521e2e4b2a7a03c4e;p=linux-2.6 [PATCH] 9p: fix rename return code 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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c index 18f26cdfd8..05d30e89ba 100644 --- a/fs/9p/vfs_inode.c +++ b/fs/9p/vfs_inode.c @@ -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; }