From patchwork Wed Jun 6 02:02:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 10449529 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 040C360375 for ; Wed, 6 Jun 2018 01:55:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E782B2997F for ; Wed, 6 Jun 2018 01:55:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D62D929991; Wed, 6 Jun 2018 01:55:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6C5242997F for ; Wed, 6 Jun 2018 01:55:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752726AbeFFBzw (ORCPT ); Tue, 5 Jun 2018 21:55:52 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:37003 "EHLO huawei.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1752713AbeFFBzw (ORCPT ); Tue, 5 Jun 2018 21:55:52 -0400 Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 0CBF0C718BA8F; Wed, 6 Jun 2018 09:55:49 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.382.0; Wed, 6 Jun 2018 09:55:43 +0800 From: Wei Yongjun To: Trond Myklebust , Anna Schumaker , Fred Isaman CC: Wei Yongjun , , Subject: [PATCH -next] pnfs: Use GFP_ATOMIC under spin lock Date: Wed, 6 Jun 2018 02:02:18 +0000 Message-ID: <1528250538-50721-1-git-send-email-weiyongjun1@huawei.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 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 X-Virus-Scanned: ClamAV using ClamSMTP A spin lock is taken here so we should use GFP_ATOMIC. Fixes: 2409a976a299 ("pnfs: Add LAYOUTGET to OPEN of a new file") Signed-off-by: Wei Yongjun --- fs/nfs/pnfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c index d93942f..1ff1998 100644 --- a/fs/nfs/pnfs.c +++ b/fs/nfs/pnfs.c @@ -2009,7 +2009,7 @@ struct pnfs_layout_segment * 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))