diff -druN Linux-2.4.18-nfsall/fs/nfs/dir.c linux-2.4.18/fs/nfs/dir.c
--- Linux-2.4.18-nfsall/fs/nfs/dir.c	Fri Mar  1 20:09:17 2002
+++ linux-2.4.18/fs/nfs/dir.c	Sat Mar  2 01:56:05 2002
@@ -134,7 +134,7 @@
 	if (error < 0) {
 		if (error == -ENOTSUPP && desc->plus) {
 			NFS_SERVER(inode)->caps &= ~NFS_CAP_READDIRPLUS;
-			NFS_FLAGS(inode) &= ~NFS_INO_ADVISE_RDPLUS;
+			clear_bit(NFS_INO_ADVISE_RDPLUS, &NFS_FLAGS(inode));
 			desc->plus = 0;
 			goto again;
 		}
diff -druN Linux-2.4.18-nfsall/fs/nfs/direct.c linux-2.4.18/fs/nfs/direct.c
--- Linux-2.4.18-nfsall/fs/nfs/direct.c	Fri Mar  1 20:09:17 2002
+++ linux-2.4.18/fs/nfs/direct.c	Sat Mar  2 00:02:12 2002
@@ -53,8 +53,8 @@
 	int result;
 	struct inode * inode = file->f_dentry->d_inode;
 	struct nfs_fattr fattr;
-        struct rpc_message msg;
-        struct nfs_readres res = { &fattr, arg->count, 0 };
+	struct rpc_message msg;
+	struct nfs_readres res = { &fattr, arg->count, 0 };
 
 #ifdef CONFIG_NFS_V3
 	msg.rpc_proc = (NFS_PROTO(inode)->version == 3) ?
@@ -63,14 +63,12 @@
 	msg.rpc_proc = NFSPROC_READ;
 #endif
 	msg.rpc_argp = arg;
-        msg.rpc_resp = &res;
+	msg.rpc_resp = &res;
 
-	lock_kernel();
-        msg.rpc_cred = nfs_file_cred(file);
-        fattr.valid = 0;
-        result = rpc_call_sync(NFS_CLIENT(inode), &msg, 0);
+	msg.rpc_cred = nfs_file_cred(file);
+	fattr.valid = 0;
+	result = rpc_call_sync(NFS_CLIENT(inode), &msg, 0);
 	nfs_refresh_inode(inode, &fattr);
-	unlock_kernel();
 
 	return result;
 }
@@ -82,8 +80,8 @@
 	int result;
 	struct inode *inode = file->f_dentry->d_inode;
 	struct nfs_fattr fattr;
-        struct rpc_message msg;
-        struct nfs_writeres res = { &fattr, verf, 0 };
+	struct rpc_message msg;
+	struct nfs_writeres res = { &fattr, verf, 0 };
 
 #ifdef CONFIG_NFS_V3
 	msg.rpc_proc = (NFS_PROTO(inode)->version == 3) ?
@@ -92,15 +90,13 @@
 	msg.rpc_proc = NFSPROC_WRITE;
 #endif
 	msg.rpc_argp = arg;
-        msg.rpc_resp = &res;
+	msg.rpc_resp = &res;
 
-	lock_kernel();
 	msg.rpc_cred = get_rpccred(nfs_file_cred(file));
 	fattr.valid = 0;
-        result = rpc_call_sync(NFS_CLIENT(inode), &msg, 0);
+	result = rpc_call_sync(NFS_CLIENT(inode), &msg, 0);
 	nfs_write_attributes(inode, &fattr);
 	put_rpccred(msg.rpc_cred);
-	unlock_kernel();
 
 #ifdef CONFIG_NFS_V3
 	if (NFS_PROTO(inode)->version == 3) {
@@ -145,10 +141,8 @@
 
 	fattr.valid = 0;
 
-	lock_kernel();
 	result = rpc_call_sync(NFS_CLIENT(inode), &msg, 0);
 	nfs_write_attributes(inode, &fattr);
-	unlock_kernel();
 
 	return result;
 }
diff -druN Linux-2.4.18-nfsall/fs/nfs/file.c linux-2.4.18/fs/nfs/file.c
--- Linux-2.4.18-nfsall/fs/nfs/file.c	Fri Mar  1 20:09:17 2002
+++ linux-2.4.18/fs/nfs/file.c	Fri Mar  1 23:00:29 2002
@@ -100,9 +100,7 @@
 		dentry->d_parent->d_name.name, dentry->d_name.name,
 		(unsigned long) count, (unsigned long) *ppos);
 
-	lock_kernel();
 	result = nfs_revalidate_inode(NFS_SERVER(inode), inode);
-	unlock_kernel();
 	if (!result)
 		result = generic_file_read(file, buf, count, ppos);
 	return result;
@@ -118,9 +116,7 @@
 	dfprintk(VFS, "nfs: mmap(%s/%s)\n",
 		dentry->d_parent->d_name.name, dentry->d_name.name);
 
-	lock_kernel();
 	status = nfs_revalidate_inode(NFS_SERVER(inode), inode);
-	unlock_kernel();
 	if (!status)
 		status = generic_file_mmap(file, vma);
 	return status;
@@ -220,9 +216,7 @@
 	result = -EBUSY;
 	if (IS_SWAPFILE(inode))
 		goto out_swapfile;
-	lock_kernel();
 	result = nfs_revalidate_inode(NFS_SERVER(inode), inode);
-	unlock_kernel();
 	if (result)
 		goto out;
 
diff -druN Linux-2.4.18-nfsall/fs/nfs/inode.c linux-2.4.18/fs/nfs/inode.c
--- Linux-2.4.18-nfsall/fs/nfs/inode.c	Fri Mar  1 20:09:17 2002
+++ linux-2.4.18/fs/nfs/inode.c	Sat Mar  2 02:06:01 2002
@@ -670,7 +670,7 @@
 		inode->i_fop = &nfs_dir_operations;
 		if (nfs_server_capable(inode, NFS_CAP_READDIRPLUS)
 		    && fattr->size <= NFS_LIMIT_READDIRPLUS)
-			NFS_FLAGS(inode) |= NFS_INO_ADVISE_RDPLUS;
+			set_bit(NFS_INO_ADVISE_RDPLUS, &NFS_FLAGS(inode));
 	} else if (S_ISLNK(inode->i_mode))
 		inode->i_op = &nfs_symlink_inode_operations;
 	else
@@ -830,17 +830,18 @@
 
 /*
  * Wait for the inode to get unlocked.
- * (Used for NFS_INO_LOCKED and NFS_INO_REVALIDATING).
+ * (Used for NFS_INO_REVALIDATING).
  */
-int
-nfs_wait_on_inode(struct inode *inode, int flag)
+static int
+nfs_wait_on_inode(struct inode *inode, unsigned bitnr)
 {
 	struct rpc_clnt	*clnt = NFS_CLIENT(inode);
 	int error;
-	if (!(NFS_FLAGS(inode) & flag))
+	if (!(test_bit(bitnr, &NFS_FLAGS(inode))))
 		return 0;
 	atomic_inc(&inode->i_count);
-	error = nfs_wait_event(clnt, inode->i_wait, !(NFS_FLAGS(inode) & flag));
+	error = nfs_wait_event(clnt, inode->i_wait,
+				!(test_bit(bitnr, &NFS_FLAGS(inode))));
 	iput(inode);
 	return error;
 }
@@ -853,9 +854,7 @@
 {
 	struct inode *inode = dentry->d_inode;
 	int status;
-	lock_kernel();
 	status = nfs_revalidate_inode(NFS_SERVER(inode), inode);
-	unlock_kernel();
 	return status;
 }
 
@@ -930,14 +929,14 @@
 			goto out_nowait;
 		}
 	}
-	NFS_FLAGS(inode) |= NFS_INO_REVALIDATING;
+	set_bit(NFS_INO_REVALIDATING, &NFS_FLAGS(inode));
 
 	status = NFS_PROTO(inode)->getattr(inode, &fattr);
 	if (status) {
 		dfprintk(PAGECACHE, "nfs_revalidate_inode: (%x/%Ld) getattr failed, error=%d\n",
 			 inode->i_dev, (long long)NFS_FILEID(inode), status);
 		if (status == -ESTALE) {
-			NFS_FLAGS(inode) |= NFS_INO_STALE;
+			set_bit(NFS_INO_STALE, &NFS_FLAGS(inode));
 			if (inode != inode->i_sb->s_root->d_inode)
 				remove_inode_hash(inode);
 		}
@@ -953,9 +952,9 @@
 	dfprintk(PAGECACHE, "NFS: (%x/%Ld) revalidation complete\n",
 		inode->i_dev, (long long)NFS_FILEID(inode));
 
-	NFS_FLAGS(inode) &= ~NFS_INO_STALE;
+	clear_bit(NFS_INO_STALE, &NFS_FLAGS(inode));
 out:
-	NFS_FLAGS(inode) &= ~NFS_INO_REVALIDATING;
+	clear_bit(NFS_INO_REVALIDATING, &NFS_FLAGS(inode));
 	wake_up(&inode->i_wait);
  out_nowait:
 	return status;
diff -druN Linux-2.4.18-nfsall/fs/nfs/symlink.c linux-2.4.18/fs/nfs/symlink.c
--- Linux-2.4.18-nfsall/fs/nfs/symlink.c	Fri Mar  1 18:52:03 2002
+++ linux-2.4.18/fs/nfs/symlink.c	Fri Mar  1 23:00:58 2002
@@ -36,10 +36,8 @@
 	 * in host byte order, followed by the string.  The
 	 * XDR response verification will NULL terminate it.
 	 */
-	lock_kernel();
 	error = NFS_PROTO(inode)->readlink(inode, buffer,
 					   PAGE_CACHE_SIZE - sizeof(u32)-4);
-	unlock_kernel();
 	if (error < 0)
 		goto error;
 	SetPageUptodate(page);
diff -druN Linux-2.4.18-nfsall/include/linux/nfs_fs.h linux-2.4.18/include/linux/nfs_fs.h
--- Linux-2.4.18-nfsall/include/linux/nfs_fs.h	Fri Mar  1 20:09:18 2002
+++ linux-2.4.18/include/linux/nfs_fs.h	Sat Mar  2 01:59:53 2002
@@ -92,11 +92,6 @@
 	(S_ISDIR(inode->i_mode)? NFS_SERVER(inode)->acdirmax \
 			       : NFS_SERVER(inode)->acregmax)
 #define NFS_ATTRTIMEO_UPDATE(inode)	((inode)->u.nfs_i.attrtimeo_timestamp)
-
-#define NFS_FLAGS(inode)		((inode)->u.nfs_i.flags)
-#define NFS_REVALIDATING(inode)		(NFS_FLAGS(inode) & NFS_INO_REVALIDATING)
-#define NFS_STALE(inode)		(NFS_FLAGS(inode) & NFS_INO_STALE)
-
 #define NFS_FILEID(inode)		((inode)->u.nfs_i.fileid)
 
 static inline int nfs_server_capable(struct inode *inode, int cap)
@@ -104,9 +99,21 @@
 	return NFS_SERVER(inode)->caps & cap;
 }
 
+#define NFS_FLAGS(inode)		((inode)->u.nfs_i.flags)
+
+static inline int NFS_STALE(struct inode *inode)
+{
+	return test_bit(NFS_INO_STALE, &NFS_FLAGS(inode));
+}
+
 static inline int NFS_USE_READDIRPLUS(struct inode *inode)
 {
-	return NFS_FLAGS(inode) & NFS_INO_ADVISE_RDPLUS;
+	return test_bit(NFS_INO_ADVISE_RDPLUS, &NFS_FLAGS(inode));
+}
+
+static inline int NFS_REVALIDATING(struct inode *inode)
+{
+	return test_bit(NFS_INO_REVALIDATING, &NFS_FLAGS(inode));
 }
 
 /*
diff -druN Linux-2.4.18-nfsall/include/linux/nfs_fs_i.h linux-2.4.18/include/linux/nfs_fs_i.h
--- Linux-2.4.18-nfsall/include/linux/nfs_fs_i.h	Fri Mar  1 20:09:18 2002
+++ linux-2.4.18/include/linux/nfs_fs_i.h	Sat Mar  2 18:23:32 2002
@@ -22,7 +22,7 @@
 	/*
 	 * Various flags
 	 */
-	unsigned short		flags;
+	unsigned long		flags;
 
 	/*
 	 * read_cache_jiffies is when we started read-caching this inode,
@@ -80,11 +80,9 @@
 /*
  * Legal inode flag values
  */
-#define NFS_INO_STALE		0x0001		/* possible stale inode */
-#define NFS_INO_ADVISE_RDPLUS   0x0002          /* advise readdirplus */
-#define NFS_INO_REVALIDATING	0x0004		/* revalidating attrs */
-#define NFS_IS_SNAPSHOT		0x0010		/* a snapshot file */
-#define NFS_INO_FLUSH		0x0020		/* inode is due for flushing */
+#define NFS_INO_STALE		0		/* possible stale inode */
+#define NFS_INO_ADVISE_RDPLUS	1		/* advise readdirplus */
+#define NFS_INO_REVALIDATING	2		/* revalidating attrs */
 
 /*
  * NFS lock info
