Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp3804036ybz; Tue, 28 Apr 2020 00:22:03 -0700 (PDT) X-Google-Smtp-Source: APiQypL2W9AFnu5o/ZVCDna271m8+blSDV9y0e71UR9szFBe4Qddy2Y6NiZ0A/eY513yRnUYNE+q X-Received: by 2002:a50:d7d3:: with SMTP id m19mr21967810edj.285.1588058523384; Tue, 28 Apr 2020 00:22:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588058523; cv=none; d=google.com; s=arc-20160816; b=puIk/L8FIcOB4M7zg8Jc4R2amZwjkVpeNLJe8VjblSeeryYSsRhzV8dIKCPk5wF5ii eVO5Y57HulQ+s7aQaUizYr7I4FtMgbslz1jVLwaONgToFc+QjR+5VXls98g6icU1ky5r 8DPsU+Udr5V3qgbHmoDstwFa+9TBF4xrCtQb6ySyEYWMa+OfGEOB2sT2kbnQPFK7KNeH 7V9eDIHptcK1rH1Pac9toHqdnWO5+Q7oY87pBZG3rwoz5Og2S5OtBB5rGItu/L0k7+03 brZLHiGLRwxa9bOyVEeuKCnhCAGaPF/daguhgi+BpY/gdmheURusri9NQFfBVntrjvD+ wDxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=6Fsb99onUFpHIgTEfCnT/ign8OolUFBVykPFq+5cn6c=; b=KOaIEti2JICiaDdUVOvrlQOZX6K01xLzJrYGf3u59YWa6dBv61m7tjMX09afTM3jLW VQwUV3/qUhO9nop8Rn+57UsAC7Gk7XBJp6HQDRoJlUV6MzqOebEgMFRGKc9MDHWwcaG5 DSa+Rw7OgbemRi97kzud9/YwrXPe9LgCRpeKKiuNgkoMNRIos1rqSufLiRmZyWE6/Iz2 SMSCnxVJJR2yRIBBefxtAGvln6ryQq3OAtpHITtmkkBltZgzEj/WbANwFnp/l2p0eake WW5Obl1ZgRcO5NpFDVxq0u5gBHtlTyZmhaMCFJXJgG31/Bhye65fVPoIBx753l+F19PN s4PQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q1si1119859edj.64.2020.04.28.00.21.30; Tue, 28 Apr 2020 00:22:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726450AbgD1HSa (ORCPT + 99 others); Tue, 28 Apr 2020 03:18:30 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:41556 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726284AbgD1HSa (ORCPT ); Tue, 28 Apr 2020 03:18:30 -0400 Received: from DGGEMS405-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 8D35D3B30969C8CAFF1F; Tue, 28 Apr 2020 15:18:25 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS405-HUB.china.huawei.com (10.3.19.205) with Microsoft SMTP Server id 14.3.487.0; Tue, 28 Apr 2020 15:18:15 +0800 From: Wei Yongjun To: Trond Myklebust , Anna Schumaker CC: Wei Yongjun , , Subject: [PATCH -next] NFSv4: Use GFP_ATOMIC under spin lock in _pnfs_grab_empty_layout() Date: Tue, 28 Apr 2020 07:19:32 +0000 Message-ID: <20200428071932.69976-1-weiyongjun1@huawei.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org A spin lock is taken here so we should use GFP_ATOMIC. Signed-off-by: Wei Yongjun --- 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))