summaryrefslogtreecommitdiffstats
path: root/fs/nfs/proc.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-10-05 01:18:40 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-10-05 01:18:40 +0000
commit012bb3e61e5eced6c610f9e036372bf0c8def2d1 (patch)
tree87efc733f9b164e8c85c0336f92c8fb7eff6d183 /fs/nfs/proc.c
parent625a1589d3d6464b5d90b8a0918789e3afffd220 (diff)
Merge with Linux 2.4.0-test9. Please check DECstation, I had a number
of rejects to fixup while integrating Linus patches. I also found that this kernel will only boot SMP on Origin; the UP kernel freeze soon after bootup with SCSI timeout messages. I commit this anyway since I found that the last CVS versions had the same problem.
Diffstat (limited to 'fs/nfs/proc.c')
-rw-r--r--fs/nfs/proc.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/fs/nfs/proc.c b/fs/nfs/proc.c
index 574c26a15..be935c083 100644
--- a/fs/nfs/proc.c
+++ b/fs/nfs/proc.c
@@ -233,6 +233,31 @@ nfs_proc_remove(struct dentry *dir, struct qstr *name)
}
static int
+nfs_proc_unlink_setup(struct rpc_message *msg, struct dentry *dir, struct qstr *name)
+{
+ struct nfs_diropargs *arg;
+
+ arg = (struct nfs_diropargs *)kmalloc(sizeof(*arg), GFP_KERNEL);
+ if (!arg)
+ return -ENOMEM;
+ arg->fh = NFS_FH(dir);
+ arg->name = name->name;
+ arg->len = name->len;
+ msg->rpc_proc = NFSPROC_REMOVE;
+ msg->rpc_argp = arg;
+ return 0;
+}
+
+static void
+nfs_proc_unlink_done(struct dentry *dir, struct rpc_message *msg)
+{
+ if (msg->rpc_argp) {
+ NFS_CACHEINV(dir->d_inode);
+ kfree(msg->rpc_argp);
+ }
+}
+
+static int
nfs_proc_rename(struct dentry *old_dir, struct qstr *old_name,
struct dentry *new_dir, struct qstr *new_name)
{
@@ -365,6 +390,8 @@ struct nfs_rpc_ops nfs_v2_clientops = {
NULL, /* commit */
nfs_proc_create,
nfs_proc_remove,
+ nfs_proc_unlink_setup,
+ nfs_proc_unlink_done,
nfs_proc_rename,
nfs_proc_link,
nfs_proc_symlink,