The same rpciod codepaths that can trigger GFP_KERNEL allocations are still able to initiate writeback of NFS pages. Avoid this by adding an explicit test for PF_FSTRANS in nfs_writepage(). Signed-off-by: Trond Myklebust <trond.myklebust@xxxxxxxxxxxxxxx> --- fs/nfs/write.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/fs/nfs/write.c b/fs/nfs/write.c index 175d5d073ccf..b87f681c0e84 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c @@ -14,6 +14,7 @@ #include <linux/writeback.h> #include <linux/swap.h> #include <linux/migrate.h> +#include <linux/sched.h> #include <linux/sunrpc/clnt.h> #include <linux/nfs_fs.h> @@ -633,9 +634,14 @@ static int nfs_writepage_locked(struct page *page, struct writeback_control *wbc int nfs_writepage(struct page *page, struct writeback_control *wbc) { - int ret; + int ret = 0; + if (unlikely(current->flags & PF_FSTRANS)) { + redirty_page_for_writepage(wbc, page); + goto unlock; + } ret = nfs_writepage_locked(page, wbc); +unlock: unlock_page(page); return ret; } -- 1.9.3 -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html