aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs/file.c')
-rw-r--r--fs/nfs/file.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/nfs/file.c b/fs/nfs/file.c
index dd2f13077be..6c6e2c46122 100644
--- a/fs/nfs/file.c
+++ b/fs/nfs/file.c
@@ -493,8 +493,11 @@ static int nfs_release_page(struct page *page, gfp_t gfp)
493 493
494 dfprintk(PAGECACHE, "NFS: release_page(%p)\n", page); 494 dfprintk(PAGECACHE, "NFS: release_page(%p)\n", page);
495 495
496 /* Only do I/O if gfp is a superset of GFP_KERNEL */ 496 /* Only do I/O if gfp is a superset of GFP_KERNEL, and we're not
497 if (mapping && (gfp & GFP_KERNEL) == GFP_KERNEL) { 497 * doing this memory reclaim for a fs-related allocation.
498 */
499 if (mapping && (gfp & GFP_KERNEL) == GFP_KERNEL &&
500 !(current->flags & PF_FSTRANS)) {
498 int how = FLUSH_SYNC; 501 int how = FLUSH_SYNC;
499 502
500 /* Don't let kswapd deadlock waiting for OOM RPC calls */ 503 /* Don't let kswapd deadlock waiting for OOM RPC calls */