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=-1.1 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 392CBC433EF for ; Thu, 23 Jun 2022 19:03:33 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9CDE98E0184; Thu, 23 Jun 2022 15:03:32 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 956A28E0144; Thu, 23 Jun 2022 15:03:32 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7F7448E0184; Thu, 23 Jun 2022 15:03:32 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 6CA158E0144 for ; Thu, 23 Jun 2022 15:03:32 -0400 (EDT) Received: from smtpin20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 346EC35E02 for ; Thu, 23 Jun 2022 19:03:27 +0000 (UTC) X-FDA: 79610424054.20.6C00FAD Received: from mx0a-00082601.pphosted.com (mx0a-00082601.pphosted.com [67.231.145.42]) by imf31.hostedemail.com (Postfix) with ESMTP id A0CE320039 for ; Thu, 23 Jun 2022 19:03:26 +0000 (UTC) Received: from pps.filterd (m0109333.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 25NHunJ3020209 for ; Thu, 23 Jun 2022 11:31:13 -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=2ubX2t1H4jw4S3E5cOEtl91kfZ1W/8/gWyZU2hf/FHo=; b=ZEiJdep0uxRsGy9QldhJqt3wJFaObvZBaMkoPVrnBrC3Nv7NFnOn4pra716yJ95LNDGP HEZi1QoCVTVFQPxUSn5BnztMm8dUmUmDHtW5lir/CPvWHLU6Hj4vPUUzbue2ELU5PNAp a4k5ddv2IRUaaJM3/SpbYMLyP+U/4rg3avc= Received: from maileast.thefacebook.com ([163.114.130.16]) by mx0a-00082601.pphosted.com (PPS) with ESMTPS id 3gvqnbtp7j-3 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Thu, 23 Jun 2022 11:31:12 -0700 Received: from twshared1457.37.frc1.facebook.com (2620:10d:c0a8:1b::d) by mail.thefacebook.com (2620:10d:c0a8:82::c) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Thu, 23 Jun 2022 11:31:11 -0700 Received: by devvm225.atn0.facebook.com (Postfix, from userid 425415) id A256710C5DC6D; Thu, 23 Jun 2022 10:52:00 -0700 (PDT) From: Stefan Roesch To: , , , , CC: , , , , , , Christoph Hellwig , "Darrick J . Wong" Subject: [RESEND PATCH v9 13/14] xfs: Specify lockmode when calling xfs_ilock_for_iomap() Date: Thu, 23 Jun 2022 10:51:56 -0700 Message-ID: <20220623175157.1715274-14-shr@fb.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220623175157.1715274-1-shr@fb.com> References: <20220623175157.1715274-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: FW6fjuH_-mT6fH_6k8Vf8ZK0VRfIuH9X X-Proofpoint-GUID: FW6fjuH_-mT6fH_6k8Vf8ZK0VRfIuH9X X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.883,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-06-23_08,2022-06-23_01,2022-06-22_01 ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1656011006; a=rsa-sha256; cv=none; b=cTkNW8U1Tw+PapJ9m1H97L+23AtaNesDOVNyj6LaFfzspT7QjQF+rPnu4uXI/vWmPXkzj5 F25orKvNU0PEWkiOQFfmUs3WI2aKthjXVlFlH12vtWdyKABWH1Zo9phoNnpwK4BaJ+R0dH JpEboPNSjxwGNpqF069swAbNLNciB1g= ARC-Authentication-Results: i=1; imf31.hostedemail.com; dkim=pass header.d=fb.com header.s=facebook header.b=ZEiJdep0; spf=none (imf31.hostedemail.com: domain of "prvs=71737354e2=shr@fb.com" has no SPF policy when checking 67.231.145.42) smtp.mailfrom="prvs=71737354e2=shr@fb.com"; dmarc=pass (policy=reject) header.from=fb.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1656011006; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=2ubX2t1H4jw4S3E5cOEtl91kfZ1W/8/gWyZU2hf/FHo=; b=JE8yp85y0ePfdb3Jut+wKwD2XdZIf8s3uO/9vuyeG5Qj45OxS8WJsHj5YSI96HQLqSC942 1Ngx6m5gHhio/Gfrc4wbM6z6o8rEQ5T1FtVXZHKHL4GKjewMNB/VrtKhEJifryeKdPhbo/ VLYhXgZ4ckhWs00vppk0TedoMjUBzg0= X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: A0CE320039 Authentication-Results: imf31.hostedemail.com; dkim=pass header.d=fb.com header.s=facebook header.b=ZEiJdep0; spf=none (imf31.hostedemail.com: domain of "prvs=71737354e2=shr@fb.com" has no SPF policy when checking 67.231.145.42) smtp.mailfrom="prvs=71737354e2=shr@fb.com"; dmarc=pass (policy=reject) header.from=fb.com X-Rspam-User: X-Stat-Signature: j78t96x3tnr4qbs6gpdr35qxpjtccyy3 X-HE-Tag: 1656011006-723647 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: This patch changes the helper function xfs_ilock_for_iomap such that the lock mode must be passed in. Signed-off-by: Stefan Roesch Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong --- 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 5a393259a3a3..bcf7c3694290 100644 --- a/fs/xfs/xfs_iomap.c +++ b/fs/xfs/xfs_iomap.c @@ -664,7 +664,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 /* @@ -742,7 +742,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 @@ -1172,7 +1172,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