Message ID | 20240122140202.6950-10-konishi.ryusuke@gmail.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-33129-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2bc4:b0:101:a8e8:374 with SMTP id hx4csp2591229dyb; Mon, 22 Jan 2024 06:07:00 -0800 (PST) X-Google-Smtp-Source: AGHT+IFc1m+tLkc7y60/SEKSoHoyCih73XdrURnJLtKt2RqVWEj9/6BHBNHBm4MSmDtCjmn1mYbB X-Received: by 2002:a05:6830:918:b0:6df:a4b2:8e58 with SMTP id v24-20020a056830091800b006dfa4b28e58mr5125168ott.55.1705932420125; Mon, 22 Jan 2024 06:07:00 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705932420; cv=pass; d=google.com; s=arc-20160816; b=s7rXrRIHqDL5817rptjdJaGPCU8I+8CxOztWzybpBn+HdE8S+ba8TKwMOIKDmq019p UvFNuS1lS4H0P7Rn54JMxD5JXjy0w4i/dRkJ2rTXNfy80HI4OqKJqfXYQB5pKB+aWMDm nd/7J+iQQlGa7EFT9XZymGRFlIuiBLnLbUPRqOlEo8dQTVEawHLmKilQ6IiJDJqRQigY k+SHT9BOAaBI7T4ymHC9VPkyJk6Ge++ozXm0duHhTavhilZudh6l0R6S6IhuVEEWi7gu VIkMaZwH2BizXjIkZOAVjxkvjBBhvNeZbUi02zIuZclHDLNrc832fue3wDpmPHrpEOt/ Wacw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=LvGoX9VOfmX4dn+RR4IR/9t7Alhj00s+830PV0mY3JA=; fh=M4BPaMQ5Q3X2+FKbhXoDpy+/1kcj8JGJnMEJ6o+yvT4=; b=04g/0EinZsPUTy1qBVsRUslLqce/Tany4zJyQYayFzkUB2vacZ2TnkukW5sd323/5e df0xOOSrwgpFIL7M/2b5RgGpLlh/j6gq7GKjegyzFyQoDclYUDKp5QHjar99FmmKfvK1 3JqDeeMMTLkrRqcsIbLwd9hZwk0C9JP/nt1fPKibArdDeb0oQs2UDEVQ6h/2PtMnWyg+ E0qhg/M1bQoYipmclHLy7qlMUgAe+HflntUGO88qDgqB96yNt/AciIN1Q+eAoG0ZbTp4 YaEpuDkx//XKZxwpXv5yx+W+5BOTDWp1gfIYw7K0GMwxZGvrVIIOkUcdKLe/EutlUyB/ igjg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=gGSmUmXA; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-33129-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-33129-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id by5-20020a056830608500b006d8a455abb7si3411088otb.20.2024.01.22.06.06.59 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 06:07:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-33129-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=gGSmUmXA; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-33129-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-33129-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 17C7628B240 for <ouuuleilei@gmail.com>; Mon, 22 Jan 2024 14:05:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 333833EA9E; Mon, 22 Jan 2024 14:02:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="gGSmUmXA" Received: from mail-pf1-f173.google.com (mail-pf1-f173.google.com [209.85.210.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6A9D03E497; Mon, 22 Jan 2024 14:02:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.173 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705932156; cv=none; b=tihOtzA7jL0jlZ5Z8cASzra+8GXS+OWL95r2z9XoprCkqdv6Ib94kVx48DiIM64AhdwU087PO6TtfwHLSHO9ZfbztowVSSbhzbKH5CjE0fg+DoS6trySIf50p5VkjhUIXPHbHMUPeX6wl9KpBlaEf3D8rq5XhCtyaUGl7eOyqPs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705932156; c=relaxed/simple; bh=KBth+bbeg4R5PqQLpaKBQ2olW6SygwHEo2iHu/7IdXk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=rtZmThhYJ4cmIYv0s6kbPusM6OYOY/uHqMPYW8V0ngfBSIQ8a0OquImpgNBuRltNSdYYxPRbxTAfuQqdwtfTfegVuXNsS2gWEl1sZtNC7/6PaEf8bZrPTI2A8MLuI7lqjnzMQakzgi7cLIUjj7AZXkzgtZhSisrnMHwbpLPNMQY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=gGSmUmXA; arc=none smtp.client-ip=209.85.210.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pf1-f173.google.com with SMTP id d2e1a72fcca58-6dbd56b5357so690291b3a.1; Mon, 22 Jan 2024 06:02:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705932155; x=1706536955; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=LvGoX9VOfmX4dn+RR4IR/9t7Alhj00s+830PV0mY3JA=; b=gGSmUmXAoa8zatoROYPYnHhGAMal2iYkflAdm9RTiR4+61X+MvPm60RsR5sDlK9o7w PhsLdbX3x+kRz0ewqT0Gbws5bOJz/fukGFxZ398Go4RcIjc0OMKEsjXgU/sEbk+FgFuZ qsB125ok6eMl3wH/JkSqS5upKXJvIuiwQFNa0P4zYMaLA/UTYdPq4BF+ezy6BNdKYWuT IDM9DcVEhBj8VI7SVS99ZmvHjmY9LirmMM8PvBHhFIT6ZfWx9ZG9mkqkVz7Us9ZZP4wB c8Ugl+axk4snGSZVLPfpHtuuu/tnlQVlHEkLNnSp91CI5mcbsWz8+74qG18vq+BaxT4C 8UUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705932155; x=1706536955; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LvGoX9VOfmX4dn+RR4IR/9t7Alhj00s+830PV0mY3JA=; b=uIuDtUhmbQNSFu49P6+sGLnWAnHefiFiHrjV0qiAuohDRsjtSuExGXZmTWraMS4EXi YGODhM23ouY25S0XJG1XN/0wcDL9W+QKULBwdPdkDPF11FaSAlGUirq6Z1qhBU2V6uDW GFBoaKuXjwHVhw2uimUxEYHa6sZra8dGiGsbB3hdYaIDCtw21JiuzlVJaq4CFjLGbPHy fRUtVkh7fcYqXdKoa8ta6QjIwGRHgxjW+6IgmGOrRDxp/1IivISuVWH0bZzLiQlLOboK 6rBtxkh1iCVqrTnEuopzO/AZ2wyGqW/c6OblxPgztOq4NL7AXw0PM/MrTU9Ue6ZfqT2g iOWQ== X-Gm-Message-State: AOJu0Yw5jbkbWkY4i6ghPojvJX/+06xANM6Q0Q5o0QdmhRprLGI0oCRR NDMj8WF9R1d3v9OHCAoyc8KQb/aabbgoJgeleRbs30crjM+GOvwC X-Received: by 2002:a05:6a20:d48d:b0:19b:e6c5:2c97 with SMTP id im13-20020a056a20d48d00b0019be6c52c97mr1748589pzb.4.1705932153027; Mon, 22 Jan 2024 06:02:33 -0800 (PST) Received: from carrot.. (i223-218-154-72.s42.a014.ap.plala.or.jp. [223.218.154.72]) by smtp.gmail.com with ESMTPSA id n14-20020a62e50e000000b006da2aad58adsm9901913pff.176.2024.01.22.06.02.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 06:02:31 -0800 (PST) From: Ryusuke Konishi <konishi.ryusuke@gmail.com> To: Andrew Morton <akpm@linux-foundation.org> Cc: linux-nilfs@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 09/15] nilfs2: do not acquire rwsem in nilfs_bmap_write() Date: Mon, 22 Jan 2024 23:01:56 +0900 Message-Id: <20240122140202.6950-10-konishi.ryusuke@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240122140202.6950-1-konishi.ryusuke@gmail.com> References: <20240122140202.6950-1-konishi.ryusuke@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1788799793511161903 X-GMAIL-MSGID: 1788799793511161903 |
Series |
nilfs2: eliminate kmap and kmap_atomic calls
|
|
Commit Message
Ryusuke Konishi
Jan. 22, 2024, 2:01 p.m. UTC
It is now clear that nilfs_bmap_write() is only used to finalize logs
written to disk. Concurrent bmap modification operations are not
performed on bmaps in this context. Additionally, this function does not
modify data used in read-only operations such as bmap lookups.
Therefore, there is no need to acquire bmap->b_sem in nilfs_bmap_write(),
so delete it.
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
---
fs/nilfs2/bmap.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/fs/nilfs2/bmap.c b/fs/nilfs2/bmap.c index 7a8f166f2c8d..383f0afa2cea 100644 --- a/fs/nilfs2/bmap.c +++ b/fs/nilfs2/bmap.c @@ -548,13 +548,10 @@ int nilfs_bmap_read(struct nilfs_bmap *bmap, struct nilfs_inode *raw_inode) */ void nilfs_bmap_write(struct nilfs_bmap *bmap, struct nilfs_inode *raw_inode) { - down_write(&bmap->b_sem); memcpy(raw_inode->i_bmap, bmap->b_u.u_data, NILFS_INODE_BMAP_SIZE * sizeof(__le64)); if (bmap->b_inode->i_ino == NILFS_DAT_INO) bmap->b_last_allocated_ptr = NILFS_BMAP_NEW_PTR_INIT; - - up_write(&bmap->b_sem); } void nilfs_bmap_init_gc(struct nilfs_bmap *bmap)