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 50D36492521; Thu, 8 Jan 2026 14:19:57 +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=1767882001; cv=none; b=BLBkInpOoVOjc1b89QkvjWw9tUMFw3LEHkYBNBKKa8hy752hPjhk42KFl7HqUpMEnn2efZZPLO9vO94VLDd8LyjhSR8c+gZ3ZiSHAktQxuEKLOgB2lTV/hQacSMmWynZ/0QqanRevzI6T0MMXDUJmerFuJ340dhyLxe7PoqP3iY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767882001; c=relaxed/simple; bh=keSbMfJuBW+VHM09C5A7N5d+oqdWnQFd1ohFfEibiLU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=LbRQaq6kWD0PjvK5OsTSX839RbK9vFIsZDQ0yMcEmmTiEbgEQ3ddkZsS8JXb0ycW1+TOMsnrwNBLl9/1HxvJbySggN/9qaEFuy0dC49TMBYpMV0Enxq3v2ancGaDn5IfomHyFgLskQbnKbrry/+Ezt0sLd5Vn8OaKY2SH59IEw4= 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=xIL3YSna; 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="xIL3YSna" 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=xIL3YSna27qoyc7IJY0zTOQsUn B9PHib0Kd7P55agX3T+V8O3iGuwgvpsqawjBpv2pXEo+fI6i6snqppffWvP1CGOMSkc/yB6Y8Jtd1 zUgMZXsZif9zUgleHzz59ilf3E4mO+ca05Qkj02ATM3QsekTBZf06SiPhGFLqR/BPBdnTd/q5Gy3A 4Eb06nGhdo6gqLhJATO6yygs/VgmUDOLkStdbJcmFS3LYDPAj5FgDLrs3hyLxZCoYsTG0ya8F2vW+ M7jSWGoBgf4DJB9DwpbaW33y8PNsTJGkRV489juAd/pI7mguxa12pF71q5hdBG1cS3FELCjYqRzMm OAd9xK5Q==; 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 1vdqri-0000000HJ9L-21Ax; Thu, 08 Jan 2026 14:19:55 +0000 From: Christoph Hellwig To: Christian Brauner Cc: Al Viro , David Sterba , Jan Kara , Mike Marshall , Martin Brandenburg , Carlos Maiolino , Stefan Roesch , Jeff Layton , OGAWA Hirofumi , Trond Myklebust , Anna Schumaker , 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/11] fs: remove inode_update_time Date: Thu, 8 Jan 2026 15:19:01 +0100 Message-ID: <20260108141934.2052404-2-hch@lst.de> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260108141934.2052404-1-hch@lst.de> References: <20260108141934.2052404-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