patch-2.4.0-test4 linux/fs/nfs/inode.c

Next file: linux/fs/nfsd/vfs.c
Previous file: linux/fs/ncpfs/sock.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.0-test3/linux/fs/nfs/inode.c linux/fs/nfs/inode.c
@@ -897,11 +897,15 @@
 
 int nfs_release(struct inode *inode, struct file *filp)
 {
-	struct rpc_auth *auth = NFS_CLIENT(inode)->cl_auth;
-	struct rpc_cred *cred = nfs_file_cred(filp);
+	struct rpc_auth *auth;
+	struct rpc_cred *cred;
 
+	lock_kernel();
+	auth = NFS_CLIENT(inode)->cl_auth;
+	cred = nfs_file_cred(filp);
 	if (cred)
 		rpcauth_releasecred(auth, cred);
+	unlock_kernel();
 	return 0;
 }
 

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