patch-2.1.34 linux/fs/nfs/read.c

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

diff -u --recursive --new-file v2.1.33/linux/fs/nfs/read.c linux/fs/nfs/read.c
@@ -189,7 +189,7 @@
 
 	if (result >= 0) {
 		inode->i_count++;
-		page->count++;
+		atomic_inc(&page->count);
 		return 0;
 	}
 
@@ -219,7 +219,7 @@
 	dprintk("NFS: nfs_readpage %08lx\n", page_address(page));
 	set_bit(PG_locked, &page->flags);
 	address = page_address(page);
-	page->count++;
+	atomic_inc(&page->count);
 	if (!IS_SWAPFILE(inode) && !PageError(page)
 	 && NFS_SERVER(inode)->rsize >= PAGE_SIZE)
 		error = nfs_readpage_async(inode, page);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov