summaryrefslogtreecommitdiffstats
path: root/fs/nfs/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs/file.c')
-rw-r--r--fs/nfs/file.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/nfs/file.c b/fs/nfs/file.c
index 37f639d50af5..93e236429c5d 100644
--- a/fs/nfs/file.c
+++ b/fs/nfs/file.c
@@ -473,8 +473,8 @@ static int nfs_release_page(struct page *page, gfp_t gfp)
473 dfprintk(PAGECACHE, "NFS: release_page(%p)\n", page); 473 dfprintk(PAGECACHE, "NFS: release_page(%p)\n", page);
474 474
475 /* Always try to initiate a 'commit' if relevant, but only 475 /* Always try to initiate a 'commit' if relevant, but only
476 * wait for it if __GFP_WAIT is set. Even then, only wait 1 476 * wait for it if the caller allows blocking. Even then,
477 * second and only if the 'bdi' is not congested. 477 * only wait 1 second and only if the 'bdi' is not congested.
478 * Waiting indefinitely can cause deadlocks when the NFS 478 * Waiting indefinitely can cause deadlocks when the NFS
479 * server is on this machine, when a new TCP connection is 479 * server is on this machine, when a new TCP connection is
480 * needed and in other rare cases. There is no particular 480 * needed and in other rare cases. There is no particular
@@ -484,7 +484,7 @@ static int nfs_release_page(struct page *page, gfp_t gfp)
484 if (mapping) { 484 if (mapping) {
485 struct nfs_server *nfss = NFS_SERVER(mapping->host); 485 struct nfs_server *nfss = NFS_SERVER(mapping->host);
486 nfs_commit_inode(mapping->host, 0); 486 nfs_commit_inode(mapping->host, 0);
487 if ((gfp & __GFP_WAIT) && 487 if (gfpflags_allow_blocking(gfp) &&
488 !bdi_write_congested(&nfss->backing_dev_info)) { 488 !bdi_write_congested(&nfss->backing_dev_info)) {
489 wait_on_page_bit_killable_timeout(page, PG_private, 489 wait_on_page_bit_killable_timeout(page, PG_private,
490 HZ); 490 HZ);