summaryrefslogtreecommitdiff
path: root/fs/9p
diff options
context:
space:
mode:
authorSripathi Kodi <sripathik@in.ibm.com>2010-03-25 15:47:26 +0300
committerEric Van Hensbergen <ericvh@gmail.com>2010-05-22 01:44:34 +0400
commit4681dbdacb5cdc4d3273c3a97a1858d6e00a5fe7 (patch)
treee29be0d9f98caa7ee176cf0a1a3c3a22fca4934d /fs/9p
parentbda8e7752063cdbdd1d308bc1705400a8cec1aeb (diff)
downloadlinux-4681dbdacb5cdc4d3273c3a97a1858d6e00a5fe7.tar.xz
9p: add 9P2000.L rename operation
I made a V2 of this patch on top of my patches for VFS switches. All the changes were due to change in some offsets. rename - change name of file or directory size[4] Trename tag[2] fid[4] newdirfid[4] name[s] size[4] Rrename tag[2] The rename message is used to change the name of a file, possibly moving it to a new directory. The 9P wstat message can only rename a file within the same directory. Signed-off-by: Jim Garlick <garlick@llnl.gov> Signed-off-by: Sripathi Kodi <sripathik@in.ibm.com> Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
Diffstat (limited to 'fs/9p')
-rw-r--r--fs/9p/vfs_inode.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c
index 13a8ed6088b8..de9a39590b70 100644
--- a/fs/9p/vfs_inode.c
+++ b/fs/9p/vfs_inode.c
@@ -794,6 +794,13 @@ v9fs_vfs_rename(struct inode *old_dir, struct dentry *old_dentry,
goto clunk_olddir;
}
+ if (v9fs_proto_dotl(v9ses)) {
+ retval = p9_client_rename(oldfid, newdirfid,
+ (char *) new_dentry->d_name.name);
+ if (retval != -ENOSYS)
+ goto clunk_newdir;
+ }
+
/* 9P can only handle file rename in the same directory */
if (memcmp(&olddirfid->qid, &newdirfid->qid, sizeof(newdirfid->qid))) {
P9_DPRINTK(P9_DEBUG_ERROR,