Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

fs: remove inode_update_time

The only external user is gone now, open code it in the two VFS
callers.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://patch.msgid.link/20260108141934.2052404-2-hch@lst.de
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>

authored by

Christoph Hellwig and committed by
Christian Brauner
20b78183 8f0b4cce

+8 -16
+8 -15
fs/inode.c
··· 2157 2157 } 2158 2158 EXPORT_SYMBOL(generic_update_time); 2159 2159 2160 - /* 2161 - * This does the actual work of updating an inodes time or version. Must have 2162 - * had called mnt_want_write() before calling this. 2163 - */ 2164 - int inode_update_time(struct inode *inode, int flags) 2165 - { 2166 - if (inode->i_op->update_time) 2167 - return inode->i_op->update_time(inode, flags); 2168 - generic_update_time(inode, flags); 2169 - return 0; 2170 - } 2171 - EXPORT_SYMBOL(inode_update_time); 2172 - 2173 2160 /** 2174 2161 * atime_needs_update - update the access time 2175 2162 * @path: the &struct path to update ··· 2224 2237 * We may also fail on filesystems that have the ability to make parts 2225 2238 * of the fs read only, e.g. subvolumes in Btrfs. 2226 2239 */ 2227 - inode_update_time(inode, S_ATIME); 2240 + if (inode->i_op->update_time) 2241 + inode->i_op->update_time(inode, S_ATIME); 2242 + else 2243 + generic_update_time(inode, S_ATIME); 2228 2244 mnt_put_write_access(mnt); 2229 2245 skip_update: 2230 2246 sb_end_write(inode->i_sb); ··· 2382 2392 2383 2393 if (mnt_get_write_access_file(file)) 2384 2394 return 0; 2385 - ret = inode_update_time(inode, sync_mode); 2395 + if (inode->i_op->update_time) 2396 + ret = inode->i_op->update_time(inode, sync_mode); 2397 + else 2398 + ret = generic_update_time(inode, sync_mode); 2386 2399 mnt_put_write_access_file(file); 2387 2400 return ret; 2388 2401 }
-1
include/linux/fs.h
··· 2246 2246 2247 2247 extern bool atime_needs_update(const struct path *, struct inode *); 2248 2248 extern void touch_atime(const struct path *); 2249 - int inode_update_time(struct inode *inode, int flags); 2250 2249 2251 2250 static inline void file_accessed(struct file *file) 2252 2251 {