diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2019-03-26 03:52:32 -0400 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2019-05-07 15:58:32 -0400 |
commit | e3d73dead4988f3eb8483b28087f3ec0ff9d1398 (patch) | |
tree | a0168b7ebd40d75ff7a4374c46021eb8d7e06284 /fs/ubifs/super.c | |
parent | eea2c05d927b031034e222110a4fc34914d97ca4 (diff) |
ubifs: Remove ifdefs around CONFIG_UBIFS_ATIME_SUPPORT
ifdefs reduce readability and compile coverage. This removes the ifdefs
around CONFIG_UBIFS_ATIME_SUPPORT by replacing them with IS_ENABLED()
where applicable. The fs layer would fall back to generic_update_time()
when .update_time doesn't exist. We do this fallback explicitly now.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'fs/ubifs/super.c')
-rw-r--r-- | fs/ubifs/super.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c index d0c1228635f0..ed026ad6f455 100644 --- a/fs/ubifs/super.c +++ b/fs/ubifs/super.c | |||
@@ -129,9 +129,10 @@ struct inode *ubifs_iget(struct super_block *sb, unsigned long inum) | |||
129 | goto out_ino; | 129 | goto out_ino; |
130 | 130 | ||
131 | inode->i_flags |= S_NOCMTIME; | 131 | inode->i_flags |= S_NOCMTIME; |
132 | #ifndef CONFIG_UBIFS_ATIME_SUPPORT | 132 | |
133 | inode->i_flags |= S_NOATIME; | 133 | if (!IS_ENABLED(CONFIG_UBIFS_ATIME_SUPPORT)) |
134 | #endif | 134 | inode->i_flags |= S_NOATIME; |
135 | |||
135 | set_nlink(inode, le32_to_cpu(ino->nlink)); | 136 | set_nlink(inode, le32_to_cpu(ino->nlink)); |
136 | i_uid_write(inode, le32_to_cpu(ino->uid)); | 137 | i_uid_write(inode, le32_to_cpu(ino->uid)); |
137 | i_gid_write(inode, le32_to_cpu(ino->gid)); | 138 | i_gid_write(inode, le32_to_cpu(ino->gid)); |
@@ -2248,11 +2249,10 @@ static struct dentry *ubifs_mount(struct file_system_type *fs_type, int flags, | |||
2248 | goto out_deact; | 2249 | goto out_deact; |
2249 | /* We do not support atime */ | 2250 | /* We do not support atime */ |
2250 | sb->s_flags |= SB_ACTIVE; | 2251 | sb->s_flags |= SB_ACTIVE; |
2251 | #ifndef CONFIG_UBIFS_ATIME_SUPPORT | 2252 | if (IS_ENABLED(CONFIG_UBIFS_ATIME_SUPPORT)) |
2252 | sb->s_flags |= SB_NOATIME; | 2253 | ubifs_msg(c, "full atime support is enabled."); |
2253 | #else | 2254 | else |
2254 | ubifs_msg(c, "full atime support is enabled."); | 2255 | sb->s_flags |= SB_NOATIME; |
2255 | #endif | ||
2256 | } | 2256 | } |
2257 | 2257 | ||
2258 | /* 'fill_super()' opens ubi again so we must close it here */ | 2258 | /* 'fill_super()' opens ubi again so we must close it here */ |