Message ID | 20231127143036.2425-4-konishi.ryusuke@gmail.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce62:0:b0:403:3b70:6f57 with SMTP id o2csp3164329vqx; Mon, 27 Nov 2023 06:32:10 -0800 (PST) X-Google-Smtp-Source: AGHT+IFFwaN1gT7BI5iFk4DnYr/6gDqsaancn72bgrTQ7el/o+ea5G0iIn8ttVomManOHZ/ORGUs X-Received: by 2002:a17:90b:388e:b0:285:bcae:1894 with SMTP id mu14-20020a17090b388e00b00285bcae1894mr3572657pjb.46.1701095529972; Mon, 27 Nov 2023 06:32:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701095529; cv=none; d=google.com; s=arc-20160816; b=QfxOrVH0bkFkilbCPoueilmDmQ8K11zQ89hWYBX3CKxzNMghdTqXNlBrR4zjabPv4L BVkrEK3fVr4w5D4xPdhPI7Vhir36TszZMUXzScEx6mvo8H72aYRdexTm4iyYmvzlZ6f6 r2Z0TVc5QoBYL25Otr5IZ9XTLVcSeVD7e+3/Ln1KoNm8Gr4z2waxZy4ImgWBjXKcKAFj MqA6qQj1ZJVeB+t//Q3r76+yP9rx7kHlBevaQr8s7MxMk+BPwf7hVaSJmBF1i03WsRxC Krqxfczp4REX0Wi2tE3GvVE9lyMoVko+p6Is7HE9+8rp/BLlu+U1+Sp0NCWHrrV2wbck T1dQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=DCM3sUYAk/tlBLIzo2SaDQBBpHgsnzA0anQsHtnDawg=; fh=c4gLbwT9pvttlQWxFI2VesWIZ95B4IQ3bBh75IOono4=; b=bI+rwD4ZApGnd0zheU2mdoKBPeQCOzKPBGmscTvOunrYRJl/YCN12qRNdUE4ZRLmOn hzsZ2CrqOlHp64bWdrNVjtFd7CJObS/9syeKD+cVOSt04G3zVY7jVeEw3kZewHpULlC5 UZBVH5rOfPvySamHc6OSogG2EnlrUOS1m3Hmw/qdJij1RboF4X+VpAUwA0K1mUX3/rv4 Yh2Fi2gAIQt/H0YGtlzAqQQflrE1vxdosk7EXD/HRfpBg4tynKBjJszN4ZCaNIPXnvAn 3m4AyPyjb4rgCWdz7UeMSpSU5iOiU3vidwcYS7EPdzQ82Z4EMNQOXKebDP/cb1y0zvqk JURw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=ExiDDPRo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id t2-20020a17090aba8200b00285bb015802si3389739pjr.131.2023.11.27.06.32.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 06:32:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=ExiDDPRo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 1A1F9805DC66; Mon, 27 Nov 2023 06:32:06 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233820AbjK0Obr (ORCPT <rfc822;toshivichauhan@gmail.com> + 99 others); Mon, 27 Nov 2023 09:31:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41944 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233766AbjK0ObT (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 27 Nov 2023 09:31:19 -0500 Received: from mail-pl1-x631.google.com (mail-pl1-x631.google.com [IPv6:2607:f8b0:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C151A1707; Mon, 27 Nov 2023 06:30:52 -0800 (PST) Received: by mail-pl1-x631.google.com with SMTP id d9443c01a7336-1ce627400f6so32881405ad.2; Mon, 27 Nov 2023 06:30:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701095452; x=1701700252; 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=DCM3sUYAk/tlBLIzo2SaDQBBpHgsnzA0anQsHtnDawg=; b=ExiDDPRoA0/zQHstCPV5m9COgyMsE1YPuklgiFPgFWE6RT4+cOV8WmkswESSFX/Jce 7loF4QvMA8TxX/hqbjkLzvhXwtTSgMTefammgk9nkEC2Ylbtfk6te6J7VkU1AM8MTFWN 1TT4v/c2jtEgd3ZTA9AApwx3MQhm4nKyCRIbesLDGvYKJvmhPvV8GGMQx3+ly66WHhHs AivmTasjb/efSxd5PMdU0JdqQAbt9BdHC6RCAnUsgT7ONtoGGvL8W6X4Cn6oWlq36QIh bDSQm2nLZqJN0nB8B5ASWYYKA/j+OPEc7IhSil13V6W/x3TNGNvN8Klt82DMTEX5eHl7 TbdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701095452; x=1701700252; 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=DCM3sUYAk/tlBLIzo2SaDQBBpHgsnzA0anQsHtnDawg=; b=TBY9/dwEE94xkf3atuZOjEVJIl583gIpXrDTOmSIgWvBytA5ZVRF5delUsQtHSkM61 kQRkixZVv3K4JQQCkB3beGPCZz/CLnVbfpHJZQuXsjfuLnwgWYgXljCxeJHzU8eTHAPi EQ9DdyrjLeQ4xIID9P0GPwJAR3al+XwD+ewc/3cOSo7DDKgdmz9YM0pLslQTzYFDOe19 oLEX1KS5wJkYhsvpE56B5ddY5FeCMKRvuzyNZM3lqcmtp3qdIBvF0JhNy7XsOo/zesgv Xhvl7Cn7aDU8y5TtwDbs2Pnd/gQOV0aha3nE65eZgpdFGnWJtpIVUs6JHieefwk8LsEH PFOA== X-Gm-Message-State: AOJu0Yyy6fOllCkc91//ALWad7qGspfWPUO1iD59uxMzuUMA3Gk5ZBjK ZTrsWWJMGX+uuBOCI1+kOGNGYQW8Ryg= X-Received: by 2002:a17:902:a589:b0:1cf:e880:cb8f with SMTP id az9-20020a170902a58900b001cfe880cb8fmr487203plb.55.1701095451896; Mon, 27 Nov 2023 06:30:51 -0800 (PST) Received: from carrot.. (i60-34-119-11.s42.a014.ap.plala.or.jp. [60.34.119.11]) by smtp.gmail.com with ESMTPSA id a5-20020a170902ee8500b001cf51972586sm8302784pld.292.2023.11.27.06.30.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 06:30:51 -0800 (PST) From: Ryusuke Konishi <konishi.ryusuke@gmail.com> To: Andrew Morton <akpm@linux-foundation.org> Cc: linux-nilfs@vger.kernel.org, Matthew Wilcox <willy@infradead.org>, linux-kernel@vger.kernel.org Subject: [PATCH 03/17] nilfs2: Remove page_address() from nilfs_set_link Date: Mon, 27 Nov 2023 23:30:22 +0900 Message-Id: <20231127143036.2425-4-konishi.ryusuke@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231127143036.2425-1-konishi.ryusuke@gmail.com> References: <20231127143036.2425-1-konishi.ryusuke@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Mon, 27 Nov 2023 06:32:06 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783727945997349241 X-GMAIL-MSGID: 1783727945997349241 |
Series |
nilfs2: Folio conversions for directory paths
|
|
Commit Message
Ryusuke Konishi
Nov. 27, 2023, 2:30 p.m. UTC
From: "Matthew Wilcox (Oracle)" <willy@infradead.org> In preparation for removing kmap from directory handling, use offset_in_page() to calculate 'from'. Matches ext2. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com> --- fs/nilfs2/dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/nilfs2/dir.c b/fs/nilfs2/dir.c index b9f13bdf8fba..9c0513245a3b 100644 --- a/fs/nilfs2/dir.c +++ b/fs/nilfs2/dir.c @@ -410,7 +410,7 @@ ino_t nilfs_inode_by_name(struct inode *dir, const struct qstr *qstr) void nilfs_set_link(struct inode *dir, struct nilfs_dir_entry *de, struct page *page, struct inode *inode) { - unsigned int from = (char *)de - (char *)page_address(page); + unsigned int from = offset_in_page(de); unsigned int to = from + nilfs_rec_len_from_disk(de->rec_len); struct address_space *mapping = page->mapping; int err;