From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C4B2C2D5944; Wed, 17 Dec 2025 06:10:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.133 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765951834; cv=none; b=EZsJy8qbYxLVI3e7Ywz7SyqBG82QZZEGmg/1dwnn2JEyv7rbq34m7U8c0mPMtaZ2Y5zqioF8EuGSdsg91qVZJN7fpM2ZKil2Mka8N1hNQXLrm+y1WDvDsGi8W2FlXMZIedk15klcxAGyZQ8047D2YT9ZT2IuAiWdRbkU4HpP/70= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765951834; c=relaxed/simple; bh=keSbMfJuBW+VHM09C5A7N5d+oqdWnQFd1ohFfEibiLU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=WP6AKxLCA2X2jD+uciJDfY0j7oTCReCZyCSH4liErQ3I3M5cafWDBc/vvzKkWt0b8obJmcNBhpNxNmAVQL7Ze0MmyR1iYjGJJr1tTBzdhzc5GSPbF/sXK094aXP1iv6w7rOLMXgrjHd7toLyAiaBXAoy0cU2CWrpzuwSX7nnvhI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=lst.de; spf=none smtp.mailfrom=bombadil.srs.infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=c5HAuqfs; arc=none smtp.client-ip=198.137.202.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=lst.de Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=bombadil.srs.infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="c5HAuqfs" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=cfl0c3UMWYvaS3yIRfRnWwNXeoGpAnKPWNurXZs5J68=; b=c5HAuqfssWfcS+9o6R3Oboes3X n1Fl7P29zame/bCN3CyKyefk73qmLpxGEdAuYxGX100VHdqGkqW1i41dkXGRObu0CH9PPKfHN/AK6 2hflDY9oCBJQCCYqyjWRd5etsZCtsivln8rNDfidunL9JlbUM6rdZ1w5WhZ4Moq+rY5lF+xiyHCab tiiTuPlTDM8tkWtvoluhhaKc6wUWEXTMVir2tcKARKsRfN1VOEEA8MI8ki0GYDrLGcs6PhpsPqCTB Xb56ECS9ve05ulwmaa2as5jOHuIKSzzkGIKOFV4bEaQytlJ1iZgKBmmG/eDDRgqUAaR8oLJfrgC/7 idrKtf3Q==; Received: from 2a02-8389-2341-5b80-d601-7564-c2e0-491c.cable.dynamic.v6.surfer.at ([2a02:8389:2341:5b80:d601:7564:c2e0:491c] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.98.2 #2 (Red Hat Linux)) id 1vVkk2-00000006DOk-1Gib; Wed, 17 Dec 2025 06:10:30 +0000 From: Christoph Hellwig To: Christian Brauner Cc: Al Viro , David Sterba , Jan Kara , Mike Marshall , Martin Brandenburg , Carlos Maiolino , Stefan Roesch , Jeff Layton , linux-kernel@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, gfs2@lists.linux.dev, io-uring@vger.kernel.org, devel@lists.orangefs.org, linux-unionfs@vger.kernel.org, linux-mtd@lists.infradead.org, linux-xfs@vger.kernel.org, linux-nfs@vger.kernel.org, Chaitanya Kulkarni Subject: [PATCH 01/10] fs: remove inode_update_time Date: Wed, 17 Dec 2025 07:09:34 +0100 Message-ID: <20251217061015.923954-2-hch@lst.de> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20251217061015.923954-1-hch@lst.de> References: <20251217061015.923954-1-hch@lst.de> Precedence: bulk X-Mailing-List: io-uring@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html The only external user is gone now, open code it in the two VFS callers. Signed-off-by: Christoph Hellwig Reviewed-by: Jan Kara Reviewed-by: Chaitanya Kulkarni Reviewed-by: Jeff Layton --- fs/inode.c | 23 ++++++++--------------- include/linux/fs.h | 1 - 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/fs/inode.c b/fs/inode.c index 521383223d8a..07effa0cb999 100644 --- a/fs/inode.c +++ b/fs/inode.c @@ -2157,19 +2157,6 @@ int generic_update_time(struct inode *inode, int flags) } EXPORT_SYMBOL(generic_update_time); -/* - * This does the actual work of updating an inodes time or version. Must have - * had called mnt_want_write() before calling this. - */ -int inode_update_time(struct inode *inode, int flags) -{ - if (inode->i_op->update_time) - return inode->i_op->update_time(inode, flags); - generic_update_time(inode, flags); - return 0; -} -EXPORT_SYMBOL(inode_update_time); - /** * atime_needs_update - update the access time * @path: the &struct path to update @@ -2237,7 +2224,10 @@ void touch_atime(const struct path *path) * We may also fail on filesystems that have the ability to make parts * of the fs read only, e.g. subvolumes in Btrfs. */ - inode_update_time(inode, S_ATIME); + if (inode->i_op->update_time) + inode->i_op->update_time(inode, S_ATIME); + else + generic_update_time(inode, S_ATIME); mnt_put_write_access(mnt); skip_update: sb_end_write(inode->i_sb); @@ -2392,7 +2382,10 @@ static int file_update_time_flags(struct file *file, unsigned int flags) if (mnt_get_write_access_file(file)) return 0; - ret = inode_update_time(inode, sync_mode); + if (inode->i_op->update_time) + ret = inode->i_op->update_time(inode, sync_mode); + else + ret = generic_update_time(inode, sync_mode); mnt_put_write_access_file(file); return ret; } diff --git a/include/linux/fs.h b/include/linux/fs.h index f5c9cf28c4dc..ee623c16d835 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -2246,7 +2246,6 @@ enum file_time_flags { extern bool atime_needs_update(const struct path *, struct inode *); extern void touch_atime(const struct path *); -int inode_update_time(struct inode *inode, int flags); static inline void file_accessed(struct file *file) { -- 2.47.3