diff options
Diffstat (limited to 'fs/afs/file.c')
-rw-r--r-- | fs/afs/file.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/afs/file.c b/fs/afs/file.c index 572063dad0b3..5b98db127a1b 100644 --- a/fs/afs/file.c +++ b/fs/afs/file.c @@ -14,6 +14,7 @@ #include <linux/gfp.h> #include <linux/task_io_accounting_ops.h> #include <linux/mm.h> +#include <linux/swap.h> #include <linux/netfs.h> #include "internal.h" @@ -517,7 +518,7 @@ static int afs_releasepage(struct page *page, gfp_t gfp) * elected to wait */ #ifdef CONFIG_AFS_FSCACHE if (folio_test_fscache(folio)) { - if (!gfpflags_allow_blocking(gfp) || !(gfp & __GFP_FS)) + if (current_is_kswapd() || !(gfp & __GFP_FS)) return false; folio_wait_fscache(folio); } |