From: Trond Myklebust Date: Thu, 5 Feb 2015 22:05:08 +0000 (-0500) Subject: NFSv4.1: pnfs_send_layoutreturn should use GFP_NOFS X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e4af440aaf390ac1d39b26ef6cf4a28bcb6a5979;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git NFSv4.1: pnfs_send_layoutreturn should use GFP_NOFS In we want to be able to call pnfs_send_layoutreturn() from within the writeback path, we really want it to use GFP_NOFS in order to prevent recursion. Signed-off-by: Trond Myklebust --- diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c index 703501d3ed19..a1d8620e8cb7 100644 --- a/fs/nfs/pnfs.c +++ b/fs/nfs/pnfs.c @@ -948,7 +948,7 @@ pnfs_send_layoutreturn(struct pnfs_layout_hdr *lo, nfs4_stateid stateid, struct nfs4_layoutreturn *lrp; int status = 0; - lrp = kzalloc(sizeof(*lrp), GFP_KERNEL); + lrp = kzalloc(sizeof(*lrp), GFP_NOFS); if (unlikely(lrp == NULL)) { status = -ENOMEM; spin_lock(&ino->i_lock);