From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on gnuweeb.org X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_PASS,SPF_SOFTFAIL,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B26ACC433F5 for ; Thu, 26 May 2022 17:39:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232491AbiEZRjh (ORCPT ); Thu, 26 May 2022 13:39:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59780 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348350AbiEZRjZ (ORCPT ); Thu, 26 May 2022 13:39:25 -0400 Received: from mx0b-00082601.pphosted.com (mx0b-00082601.pphosted.com [67.231.153.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 905CF9D04A for ; Thu, 26 May 2022 10:39:20 -0700 (PDT) Received: from pps.filterd (m0109332.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 24QBRjtI009001 for ; Thu, 26 May 2022 10:39:19 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=facebook; bh=KkKc7JfZWvzdwU4gQJqw11EVWJb6LJMB0THy49VxYKA=; b=KsdmhrOguYEq8KiqrBax0DqHEpsmM5DBd9OauA446Wo/9ql6oOT0UJSY6VEs49xgxmcP dGNEiFry4mxVcaaz4IkmHqkFZN/xVHuUAF3jd+KY4BT25zLg/pbeK4khHpPMoz9Gh+OI 35iw+0pQ65h0VwO5MmRaNAOPG7qsPI3ReMM= Received: from maileast.thefacebook.com ([163.114.130.16]) by mx0a-00082601.pphosted.com (PPS) with ESMTPS id 3ga8puth7u-5 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Thu, 26 May 2022 10:39:19 -0700 Received: from twshared10560.18.frc3.facebook.com (2620:10d:c0a8:1b::d) by mail.thefacebook.com (2620:10d:c0a8:83::4) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Thu, 26 May 2022 10:39:18 -0700 Received: by devvm225.atn0.facebook.com (Postfix, from userid 425415) id A777BFA621E6; Thu, 26 May 2022 10:38:45 -0700 (PDT) From: Stefan Roesch To: , , , , CC: , , , Subject: [PATCH v6 13/16] xfs: Specify lockmode when calling xfs_ilock_for_iomap() Date: Thu, 26 May 2022 10:38:37 -0700 Message-ID: <20220526173840.578265-14-shr@fb.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220526173840.578265-1-shr@fb.com> References: <20220526173840.578265-1-shr@fb.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-FB-Internal: Safe Content-Type: text/plain X-Proofpoint-ORIG-GUID: ZGeflVCeucKtW1HnTKdyyisaVzGLRpbl X-Proofpoint-GUID: ZGeflVCeucKtW1HnTKdyyisaVzGLRpbl X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.874,Hydra:6.0.486,FMLib:17.11.64.514 definitions=2022-05-26_09,2022-05-25_02,2022-02-23_01 Precedence: bulk List-ID: X-Mailing-List: io-uring@vger.kernel.org This patch changes the helper function xfs_ilock_for_iomap such that the lock mode must be passed in. Signed-off-by: Stefan Roesch --- fs/xfs/xfs_iomap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/xfs/xfs_iomap.c b/fs/xfs/xfs_iomap.c index e552ce541ec2..3aa60e53a181 100644 --- a/fs/xfs/xfs_iomap.c +++ b/fs/xfs/xfs_iomap.c @@ -659,7 +659,7 @@ xfs_ilock_for_iomap( unsigned flags, unsigned *lockmode) { - unsigned mode =3D XFS_ILOCK_SHARED; + unsigned int mode =3D *lockmode; bool is_write =3D flags & (IOMAP_WRITE | IOMAP_ZERO); =20 /* @@ -737,7 +737,7 @@ xfs_direct_write_iomap_begin( int nimaps =3D 1, error =3D 0; bool shared =3D false; u16 iomap_flags =3D 0; - unsigned lockmode; + unsigned int lockmode =3D XFS_ILOCK_SHARED; =20 ASSERT(flags & (IOMAP_WRITE | IOMAP_ZERO)); =20 @@ -1167,7 +1167,7 @@ xfs_read_iomap_begin( xfs_fileoff_t end_fsb =3D xfs_iomap_end_fsb(mp, offset, length); int nimaps =3D 1, error =3D 0; bool shared =3D false; - unsigned lockmode; + unsigned int lockmode =3D XFS_ILOCK_SHARED; =20 ASSERT(!(flags & (IOMAP_WRITE | IOMAP_ZERO))); =20 --=20 2.30.2