patch-2.4.21 linux-2.4.21/fs/nfs/pagelist.c
Next file: linux-2.4.21/fs/nfs/read.c
Previous file: linux-2.4.21/fs/nfs/nfsroot.c
Back to the patch index
Back to the overall index
- Lines: 32
- Date:
2003-06-13 07:51:37.000000000 -0700
- Orig file:
linux-2.4.20/fs/nfs/pagelist.c
- Orig date:
2002-11-28 15:53:15.000000000 -0800
diff -urN linux-2.4.20/fs/nfs/pagelist.c linux-2.4.21/fs/nfs/pagelist.c
@@ -134,9 +134,12 @@
req->wb_cred = NULL;
}
if (req->wb_page) {
+ atomic_dec(&NFS_REQUESTLIST(req->wb_inode)->nr_requests);
+#ifdef NFS_PARANOIA
+ BUG_ON(atomic_read(&NFS_REQUESTLIST(req->wb_inode)->nr_requests) < 0);
+#endif
page_cache_release(req->wb_page);
req->wb_page = NULL;
- atomic_dec(&NFS_REQUESTLIST(req->wb_inode)->nr_requests);
}
}
@@ -159,14 +162,9 @@
spin_unlock(&nfs_wreq_lock);
#ifdef NFS_PARANOIA
- if (!list_empty(&req->wb_list))
- BUG();
- if (!list_empty(&req->wb_hash))
- BUG();
- if (NFS_WBACK_BUSY(req))
- BUG();
- if (atomic_read(&NFS_REQUESTLIST(req->wb_inode)->nr_requests) < 0)
- BUG();
+ BUG_ON(!list_empty(&req->wb_list));
+ BUG_ON(!list_empty(&req->wb_hash));
+ BUG_ON(NFS_WBACK_BUSY(req));
#endif
/* Release struct file or cached credential */
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)