[<prev] [next>] [day] [month] [year] [list]
Message-ID: <fd936b8622a9838070c58bc66e353f90e69347b1.camel@hammerspace.com>
Date: Mon, 29 Jun 2020 12:04:55 +0000
From: Trond Myklebust <trondmy@...merspace.com>
To: "vulab@...as.ac.cn" <vulab@...as.ac.cn>,
"linux-nfs@...r.kernel.org" <linux-nfs@...r.kernel.org>,
"anna.schumaker@...app.com" <anna.schumaker@...app.com>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] nfs: pnfs: use GFP_ATOMIC under spin lock
On Mon, 2020-06-29 at 14:21 +0800, Xu Wang wrote:
> A spin lock is taken here so we should use GFP_ATOMIC.
>
> Signed-off-by: Xu Wang <vulab@...as.ac.cn>
> ---
> fs/nfs/pnfs.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
> index dd2e14f5875d..d84c1b7b71d2 100644
> --- a/fs/nfs/pnfs.c
> +++ b/fs/nfs/pnfs.c
> @@ -2170,7 +2170,7 @@ _pnfs_grab_empty_layout(struct inode *ino,
> struct nfs_open_context *ctx)
> struct pnfs_layout_hdr *lo;
>
> spin_lock(&ino->i_lock);
> - lo = pnfs_find_alloc_layout(ino, ctx, GFP_KERNEL);
> + lo = pnfs_find_alloc_layout(ino, ctx, GFP_ATOMIC);
> if (!lo)
> goto out_unlock;
> if (!test_bit(NFS_LAYOUT_INVALID_STID, &lo->plh_flags))
NACK. Please read the code before sending yet another one of these
pointless patches.
--
Trond Myklebust
Linux NFS client maintainer, Hammerspace
trond.myklebust@...merspace.com
Powered by blists - more mailing lists