patch-2.4.0-test9 linux/fs/nfs/nfs3proc.c

Next file: linux/fs/nfs/nfsroot.c
Previous file: linux/fs/nfs/inode.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.0-test8/linux/fs/nfs/nfs3proc.c linux/fs/nfs/nfs3proc.c
@@ -279,6 +279,7 @@
 	arg->fh = NFS_FH(dir);
 	arg->name = name->name;
 	arg->len = name->len;
+	res->valid = 0;
 	msg->rpc_proc = NFS3PROC_REMOVE;
 	msg->rpc_argp = arg;
 	msg->rpc_resp = res;
@@ -288,10 +289,13 @@
 static void
 nfs3_proc_unlink_done(struct dentry *dir, struct rpc_message *msg)
 {
-	struct nfs_fattr	*dir_attr = (struct nfs_fattr*)msg->rpc_resp;
+	struct nfs_fattr	*dir_attr;
 
-	nfs_refresh_inode(dir->d_inode, dir_attr);
-	kfree(msg->rpc_argp);
+	if (msg->rpc_argp) {
+		dir_attr = (struct nfs_fattr*)msg->rpc_resp;
+		nfs_refresh_inode(dir->d_inode, dir_attr);
+		kfree(msg->rpc_argp);
+	}
 }
 
 static int

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)