diff -urN linux.06/fs/nfs/dir.c linux.07/fs/nfs/dir.c
--- linux.06/fs/nfs/dir.c	Thu May 30 18:14:29 2002
+++ linux.07/fs/nfs/dir.c	Thu May 30 18:18:26 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 -urN linux.06/fs/nfs/file.c linux.07/fs/nfs/file.c
--- linux.06/fs/nfs/file.c	Thu May 30 18:15:23 2002
+++ linux.07/fs/nfs/file.c	Thu May 30 18:18:31 2002
@@ -99,9 +99,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;
@@ -117,9 +115,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;
@@ -216,9 +212,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 -urN linux.06/fs/nfs/inode.c linux.07/fs/nfs/inode.c
--- linux.06/fs/nfs/inode.c	Thu May 30 18:15:23 2002
+++ linux.07/fs/nfs/inode.c	Thu May 30 18:18:31 2002
@@ -672,7 +672,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
@@ -832,17 +832,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;
 }
@@ -855,9 +856,7 @@
 {
 	struct inode *inode = dentry->d_inode;
 	int status;
-	lock_kernel();
 	status = nfs_revalidate_inode(NFS_SERVER(inode), inode);
-	unlock_kernel();
 	return status;
 }
 
@@ -923,7 +922,7 @@
 	if (NFS_STALE(inode) && inode != inode->i_sb->s_root->d_inode)
  		goto out_nowait;
 
-	while (NFS_REVALIDATING(inode)) {
+	while (test_and_set_bit(NFS_INO_REVALIDATING, &NFS_FLAGS(inode))) {
 		status = nfs_wait_on_inode(inode, NFS_INO_REVALIDATING);
 		if (status < 0)
 			goto out_nowait;
@@ -932,14 +931,13 @@
 			goto out_nowait;
 		}
 	}
-	NFS_FLAGS(inode) |= NFS_INO_REVALIDATING;
 
 	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);
 		}
@@ -955,9 +953,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 -urN linux.06/fs/nfs/symlink.c linux.07/fs/nfs/symlink.c
--- linux.06/fs/nfs/symlink.c	Fri Feb  9 14:29:44 2001
+++ linux.07/fs/nfs/symlink.c	Thu May 30 18:18:31 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 -urN linux.06/include/linux/nfs_fs.h linux.07/include/linux/nfs_fs.h
--- linux.06/include/linux/nfs_fs.h	Thu May 30 18:15:23 2002
+++ linux.07/include/linux/nfs_fs.h	Thu May 30 18:18:31 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,16 @@
 	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));
 }
 
 /*
diff -urN linux.06/include/linux/nfs_fs_i.h linux.07/include/linux/nfs_fs_i.h
--- linux.06/include/linux/nfs_fs_i.h	Thu May 30 18:14:28 2002
+++ linux.07/include/linux/nfs_fs_i.h	Thu May 30 18:18:31 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
