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 C7298C43334 for ; Thu, 16 Jun 2022 21:52:24 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4EB006B0072; Thu, 16 Jun 2022 17:52:24 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 470CC6B0073; Thu, 16 Jun 2022 17:52:24 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3117C6B0074; Thu, 16 Jun 2022 17:52:24 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 2338D6B0072 for ; Thu, 16 Jun 2022 17:52:24 -0400 (EDT) Received: from smtpin24.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id E91FB204FD for ; Thu, 16 Jun 2022 21:52:23 +0000 (UTC) X-FDA: 79585448166.24.503DE9C Received: from mx0a-00082601.pphosted.com (mx0a-00082601.pphosted.com [67.231.145.42]) by imf05.hostedemail.com (Postfix) with ESMTP id 7B2BB10008C for ; Thu, 16 Jun 2022 21:52:23 +0000 (UTC) Received: from pps.filterd (m0044012.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 25GKPY8g000858 for ; Thu, 16 Jun 2022 14:52:22 -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=J83b7S549fYOhTzcdmPbe/tvUGsNdbenkBYy0QTpozHtH2wyOKyLK7rbRsO/HgZXHfpV yekdgPy8ULnIZxmaiU3dodR3JF/h1pxeFJftwfXa2fxTXdQX3AEKCB2N2Bu1kTvxMMwr 7ozWqyKeiUMU7eM8aBIfacOkKBWL6aTg7A8= Received: from mail.thefacebook.com ([163.114.132.120]) by mx0a-00082601.pphosted.com (PPS) with ESMTPS id 3gqktgwm78-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Thu, 16 Jun 2022 14:52:22 -0700 Received: from twshared18317.08.ash9.facebook.com (2620:10d:c085:208::f) by mail.thefacebook.com (2620:10d:c085:11d::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Thu, 16 Jun 2022 14:52:21 -0700 Received: by devvm225.atn0.facebook.com (Postfix, from userid 425415) id E3A19108B70BB; Thu, 16 Jun 2022 14:22:23 -0700 (PDT) From: Stefan Roesch To: , , , , CC: , , , , , , Christoph Hellwig , "Darrick J . Wong" Subject: [PATCH v9 13/14] xfs: Specify lockmode when calling xfs_ilock_for_iomap() Date: Thu, 16 Jun 2022 14:22:20 -0700 Message-ID: <20220616212221.2024518-14-shr@fb.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220616212221.2024518-1-shr@fb.com> References: <20220616212221.2024518-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: 2ENoIW9hbGe5qrZTE8wPQPigdNh3QOHv X-Proofpoint-GUID: 2ENoIW9hbGe5qrZTE8wPQPigdNh3QOHv X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.883,Hydra:6.0.517,FMLib:17.11.64.514 definitions=2022-06-16_18,2022-06-16_01,2022-02-23_01 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1655416343; 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=26yVokJNBcrngmnnUlcbQDB2AGUwbq2SdUztzy6UIZZ1ISxJ0f5xhpHJm6C0TXv9Rj3kDz ZWWyOpflhABHT7sHKvlGajeJBvbOiEcriXr3bQiW2zENu418tHhbGBd865pYPKs3FF1kze z76z2PJCZ5C/roS7wrEI1wjaD7D8X34= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1655416343; a=rsa-sha256; cv=none; b=VOM60HJRN7oFk0TDOsJZXq87xGj/EL0F/Cswo7J3RG9MIkM3h3QCYpz1DEaOlLOfzQPQlk cyeingk2+VaZTGl5VFg+L8iifpr963cBR8V9brbE6BdJlp5xIv0BE5yh/+yGuBgt+GwClH hPD3GhJOLlNTxE7WXwhd3JLP/vuNWCI= ARC-Authentication-Results: i=1; imf05.hostedemail.com; dkim=pass header.d=fb.com header.s=facebook header.b=J83b7S54; dmarc=pass (policy=reject) header.from=fb.com; spf=none (imf05.hostedemail.com: domain of "prvs=7166657324=shr@fb.com" has no SPF policy when checking 67.231.145.42) smtp.mailfrom="prvs=7166657324=shr@fb.com" Authentication-Results: imf05.hostedemail.com; dkim=pass header.d=fb.com header.s=facebook header.b=J83b7S54; dmarc=pass (policy=reject) header.from=fb.com; spf=none (imf05.hostedemail.com: domain of "prvs=7166657324=shr@fb.com" has no SPF policy when checking 67.231.145.42) smtp.mailfrom="prvs=7166657324=shr@fb.com" X-Rspamd-Server: rspam12 X-Rspam-User: X-Stat-Signature: cekem118ast3149pr6qefu6b5rax56w7 X-Rspamd-Queue-Id: 7B2BB10008C X-HE-Tag: 1655416343-175931 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