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 D64F42FF157; Thu, 20 Nov 2025 06:50:03 +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=1763621405; cv=none; b=fRV2oUhWqnztskv7SIKkri4s5lkSSLv4gfk6lUSIM5hfomO/ZFCa3XfLb/bsxdBME0RFwXF+3IRjVUiklPPpNRTuOIDYgyJaOHCaOqZqOw0nU/vZ5PJZfP3IqISEogAXuJUpk02WxeuP2d6Zk8L/+mMhNrKJe/Pm+H9LEaJnqg4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763621405; c=relaxed/simple; bh=ceFVIpFwBV1FgOJyV7Wx9ZjlOBwTSSdgmTKvnuniDb8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=FdhVmjH6l8TQRzjCE9Oj+B+WWQclAJrtPn9aYj33h2rshK76z2UhEoxaWjfxv403q+982JIOazPsJyDLo7ToMhzt+u28bZv7LHsvRNJf2U7R9e2v+VuQI3GEJ13UuChcxw2WlJqUDOKnmp/UV68LziiY4qEMZp+ybxsK4luSIwQ= 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=AjRWw1Hy; 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="AjRWw1Hy" 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=or98wLJHxapbKYrnwjTLIwQs7iyOsDWGMLcrUZgRPNo=; b=AjRWw1HytPzymG/2yjuXJJzMe4 T6h7inUFXEXlBPHNMevYmsCj8/RpnPFPNRrFW1NDofd3rS7djub3rA/pIvzcebePvl6S5MROiAaab Tef1LRVOb1HZZXq0tpLdb2vVf4rvGYARUowzgNtoOuL6Ie9AZtil7Za4X0BQ3rAjnzE03T8fcKrNK LuGF/j+aN84ySO6ETOkgEpy1CD1LG53UlezZgvdvUjkH+PocLMCrfV+HFaJ2LGxBcKbziqGvyfsl8 OqkMxGcmWbZuxX/5DzllRjbDvPRwFtmtYdnfjmrsDyq35rEwwXgddjyevkLcuRLGWxEVNsuUya5HB Ktd2WVTw==; 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 1vLyUT-00000006ErS-31y9; Thu, 20 Nov 2025 06:50:02 +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 07/16] fs: remove inode_update_time Date: Thu, 20 Nov 2025 07:47:28 +0100 Message-ID: <20251120064859.2911749-8-hch@lst.de> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20251120064859.2911749-1-hch@lst.de> References: <20251120064859.2911749-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: 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 2c55ec49b023..6e7e42915376 100644 --- a/fs/inode.c +++ b/fs/inode.c @@ -2119,19 +2119,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 @@ -2199,7 +2186,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); @@ -2354,7 +2344,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 dd3b57cfadee..b54d300285b0 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -2665,7 +2665,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