patch-1.3.87 linux/fs/nfs/bio.c

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

diff -u --recursive --new-file v1.3.86/linux/fs/nfs/bio.c linux/fs/nfs/bio.c
@@ -51,8 +51,8 @@
 
 	dprintk("NFS: do_read_nfs_sync(%p)\n", page);
 
-	page->locked = 1;
-	page->error = 0;
+	set_bit(PG_locked, &page->flags);
+	clear_bit(PG_error, &page->flags);
 
 	do {
 		if (count < rsize)
@@ -77,9 +77,9 @@
 	if (refresh) {
 		nfs_refresh_inode(inode, &fattr);
 		result = 0;
-		page->uptodate = 1;
+		set_bit(PG_uptodate, &page->flags);
 	}
-	page->locked = 0;
+	clear_bit(PG_locked, &page->flags);
 	wake_up(&page->wait);
 	return result;
 }
@@ -100,13 +100,13 @@
 	if (result >= 0
 	 && (result = nfs_proc_read_reply(&req->rq_rpcreq)) >= 0) {
 		succ++;
-		page->uptodate = 1;
+		set_bit(PG_uptodate, &page->flags);
 	} else {
 		fail++;
 		printk("BIO: %d successful reads, %d failures\n", succ, fail);
-		page->error = 1;
+		set_bit(PG_error, &page->flags);
 	}
-	page->locked = 0;
+	clear_bit(PG_locked, &page->flags);
 	wake_up(&page->wait);
 	free_page(page_address(page));
 }
@@ -119,8 +119,8 @@
 
 	dprintk("NFS: do_read_nfs_async(%p)\n", page);
 
-	page->locked = 1;
-	page->error = 0;
+	set_bit(PG_locked, &page->flags);
+	clear_bit(PG_error, &page->flags);
 
 	if (!(req = nfsiod_reserve(NFS_SERVER(inode), nfs_read_cb)))
 		goto done;
@@ -138,7 +138,7 @@
 	if (result < 0) {
 		dprintk("NFS: deferring async READ request.\n");
 		nfsiod_release(req);
-		page->locked = 0;
+		clear_bit(PG_locked, &page->flags);
 		wake_up(&page->wait);
 	}
 
@@ -155,7 +155,7 @@
 	dprintk("NFS: nfs_readpage %08lx\n", page_address(page));
 	address = page_address(page);
 	page->count++;
-	if (!page->error && NFS_SERVER(inode)->rsize >= PAGE_SIZE)
+	if (!PageError(page) && NFS_SERVER(inode)->rsize >= PAGE_SIZE)
 		error = do_read_nfs_async(inode, page);
 	if (error < 0)		/* couldn't enqueue */
 		error = do_read_nfs_sync(inode, page);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this