@@ -1508,47 +1508,18 @@ static inline bool fsuidgid_has_mapping(struct super_block *sb,
15081508 kgid_has_mapping (fs_userns , kgid );
15091509}
15101510
1511- struct timespec64 current_mgtime (struct inode * inode );
15121511struct timespec64 current_time (struct inode * inode );
15131512struct timespec64 inode_set_ctime_current (struct inode * inode );
15141513
1515- /*
1516- * Multigrain timestamps
1517- *
1518- * Conditionally use fine-grained ctime and mtime timestamps when there
1519- * are users actively observing them via getattr. The primary use-case
1520- * for this is NFS clients that use the ctime to distinguish between
1521- * different states of the file, and that are often fooled by multiple
1522- * operations that occur in the same coarse-grained timer tick.
1523- *
1524- * The kernel always keeps normalized struct timespec64 values in the ctime,
1525- * which means that only the first 30 bits of the value are used. Use the
1526- * 31st bit of the ctime's tv_nsec field as a flag to indicate that the value
1527- * has been queried since it was last updated.
1528- */
1529- #define I_CTIME_QUERIED (1L<<30)
1530-
15311514/**
15321515 * inode_get_ctime - fetch the current ctime from the inode
15331516 * @inode: inode from which to fetch ctime
15341517 *
1535- * Grab the current ctime tv_nsec field from the inode, mask off the
1536- * I_CTIME_QUERIED flag and return it. This is mostly intended for use by
1537- * internal consumers of the ctime that aren't concerned with ensuring a
1538- * fine-grained update on the next change (e.g. when preparing to store
1539- * the value in the backing store for later retrieval).
1540- *
1541- * This is safe to call regardless of whether the underlying filesystem
1542- * is using multigrain timestamps.
1518+ * Grab the current ctime from the inode and return it.
15431519 */
15441520static inline struct timespec64 inode_get_ctime (const struct inode * inode )
15451521{
1546- struct timespec64 ctime ;
1547-
1548- ctime .tv_sec = inode -> __i_ctime .tv_sec ;
1549- ctime .tv_nsec = inode -> __i_ctime .tv_nsec & ~I_CTIME_QUERIED ;
1550-
1551- return ctime ;
1522+ return inode -> __i_ctime ;
15521523}
15531524
15541525/**
@@ -2334,7 +2305,6 @@ struct file_system_type {
23342305#define FS_USERNS_MOUNT 8 /* Can be mounted by userns root */
23352306#define FS_DISALLOW_NOTIFY_PERM 16 /* Disable fanotify permission events */
23362307#define FS_ALLOW_IDMAP 32 /* FS has been updated to handle vfs idmappings. */
2337- #define FS_MGTIME 64 /* FS uses multigrain timestamps */
23382308#define FS_RENAME_DOES_D_MOVE 32768 /* FS will handle d_move() during rename() internally. */
23392309 int (* init_fs_context )(struct fs_context * );
23402310 const struct fs_parameter_spec * parameters ;
@@ -2358,17 +2328,6 @@ struct file_system_type {
23582328
23592329#define MODULE_ALIAS_FS (NAME ) MODULE_ALIAS("fs-" NAME)
23602330
2361- /**
2362- * is_mgtime: is this inode using multigrain timestamps
2363- * @inode: inode to test for multigrain timestamps
2364- *
2365- * Return true if the inode uses multigrain timestamps, false otherwise.
2366- */
2367- static inline bool is_mgtime (const struct inode * inode )
2368- {
2369- return inode -> i_sb -> s_type -> fs_flags & FS_MGTIME ;
2370- }
2371-
23722331extern struct dentry * mount_bdev (struct file_system_type * fs_type ,
23732332 int flags , const char * dev_name , void * data ,
23742333 int (* fill_super )(struct super_block * , void * , int ));
@@ -3054,7 +3013,6 @@ extern void page_put_link(void *);
30543013extern int page_symlink (struct inode * inode , const char * symname , int len );
30553014extern const struct inode_operations page_symlink_inode_operations ;
30563015extern void kfree_link (void * );
3057- void fill_mg_cmtime (struct kstat * stat , u32 request_mask , struct inode * inode );
30583016void generic_fillattr (struct mnt_idmap * , u32 , struct inode * , struct kstat * );
30593017void generic_fill_statx_attr (struct inode * inode , struct kstat * stat );
30603018extern int vfs_getattr_nosec (const struct path * , struct kstat * , u32 , unsigned int );
0 commit comments