aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--fs/inode.c2
-rw-r--r--include/linux/fs.h3
2 files changed, 4 insertions, 1 deletions
diff --git a/fs/inode.c b/fs/inode.c
index 3b66082afe22..bb0117e679de 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -241,6 +241,8 @@ int inode_init_always(struct super_block *sb, struct inode *inode)
inode->i_opflags = 0;
if (sb->s_xattr)
inode->i_opflags |= IOP_XATTR;
+ if (sb->s_type->fs_flags & FS_MGTIME)
+ inode->i_opflags |= IOP_MGTIME;
i_uid_write(inode, 0);
i_gid_write(inode, 0);
atomic_set(&inode->i_writecount, 0);
diff --git a/include/linux/fs.h b/include/linux/fs.h
index b1a3bd07711b..a9c6c8cbda50 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -623,6 +623,7 @@ is_uncached_acl(struct posix_acl *acl)
#define IOP_NOFOLLOW 0x0004
#define IOP_XATTR 0x0008
#define IOP_DEFAULT_READLINK 0x0010
+#define IOP_MGTIME 0x0020
/*
* Keep mostly read-only and often accessed (especially for
@@ -2581,7 +2582,7 @@ struct file_system_type {
*/
static inline bool is_mgtime(const struct inode *inode)
{
- return inode->i_sb->s_type->fs_flags & FS_MGTIME;
+ return inode->i_opflags & IOP_MGTIME;
}
extern struct dentry *mount_bdev(struct file_system_type *fs_type,