patch-2.4.0-test8 linux/fs/nfs/nfs3proc.c
Next file: linux/fs/nfs/proc.c
Previous file: linux/fs/nfs/dir.c
Back to the patch index
Back to the overall index
- Lines: 44
- Date:
Tue Sep 5 14:02:41 2000
- Orig file:
v2.4.0-test7/linux/fs/nfs/nfs3proc.c
- Orig date:
Fri Jun 23 21:55:10 2000
diff -u --recursive --new-file v2.4.0-test7/linux/fs/nfs/nfs3proc.c linux/fs/nfs/nfs3proc.c
@@ -267,6 +267,34 @@
}
static int
+nfs3_proc_unlink_setup(struct rpc_message *msg, struct dentry *dir, struct qstr *name)
+{
+ struct nfs3_diropargs *arg;
+ struct nfs_fattr *res;
+
+ arg = (struct nfs3_diropargs *)kmalloc(sizeof(*arg)+sizeof(*res), GFP_KERNEL);
+ if (!arg)
+ return -ENOMEM;
+ res = (struct nfs_fattr*)(arg + 1);
+ arg->fh = NFS_FH(dir);
+ arg->name = name->name;
+ arg->len = name->len;
+ msg->rpc_proc = NFS3PROC_REMOVE;
+ msg->rpc_argp = arg;
+ msg->rpc_resp = res;
+ return 0;
+}
+
+static void
+nfs3_proc_unlink_done(struct dentry *dir, struct rpc_message *msg)
+{
+ struct nfs_fattr *dir_attr = (struct nfs_fattr*)msg->rpc_resp;
+
+ nfs_refresh_inode(dir->d_inode, dir_attr);
+ kfree(msg->rpc_argp);
+}
+
+static int
nfs3_proc_rename(struct dentry *old_dir, struct qstr *old_name,
struct dentry *new_dir, struct qstr *new_name)
{
@@ -469,6 +497,8 @@
NULL, /* commit */
nfs3_proc_create,
nfs3_proc_remove,
+ nfs3_proc_unlink_setup,
+ nfs3_proc_unlink_done,
nfs3_proc_rename,
nfs3_proc_link,
nfs3_proc_symlink,
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)