summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorKari Argillander <kari.argillander@gmail.com>2021-09-09 20:09:38 +0200
committerKonstantin Komarov <almaz.alexandrovich@paragon-software.com>2021-09-20 17:53:10 +0200
commit0cde7e81cd448a5df01a3960f6608b15dc3f12a3 (patch)
tree91367f4881f2c521a3146d61a40a363be216ceb7 /fs
parentfs/ntfs3: Use sb instead of sbi->sb in fill_super (diff)
downloadlinux-0cde7e81cd448a5df01a3960f6608b15dc3f12a3.tar.xz
linux-0cde7e81cd448a5df01a3960f6608b15dc3f12a3.zip
fs/ntfs3: Remove tmp var is_ro in ntfs_fill_super
We only use this in two places so we do not really need it. Also wrapper sb_rdonly() is pretty self explanatory. This will make little bit easier to read this super long variable list in the beginning of ntfs_fill_super(). Signed-off-by: Kari Argillander <kari.argillander@gmail.com> Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/ntfs3/super.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/fs/ntfs3/super.c b/fs/ntfs3/super.c
index c18705bf857f..93b8a1f4d748 100644
--- a/fs/ntfs3/super.c
+++ b/fs/ntfs3/super.c
@@ -887,7 +887,6 @@ static int ntfs_fill_super(struct super_block *sb, struct fs_context *fc)
struct ATTR_DEF_ENTRY *t;
u16 *upcase;
u16 *shared;
- bool is_ro;
struct MFT_REF ref;
ref.high = 0;
@@ -1010,16 +1009,14 @@ static int ntfs_fill_super(struct super_block *sb, struct fs_context *fc)
iput(inode);
- is_ro = sb_rdonly(sb);
-
if (sbi->flags & NTFS_FLAGS_NEED_REPLAY) {
- if (!is_ro) {
+ if (!sb_rdonly(sb)) {
ntfs_warn(sb,
"failed to replay log file. Can't mount rw!");
return -EINVAL;
}
} else if (sbi->volume.flags & VOLUME_FLAG_DIRTY) {
- if (!is_ro && !sbi->options->force) {
+ if (!sb_rdonly(sb) && !sbi->options->force) {
ntfs_warn(
sb,
"volume is dirty and \"force\" flag is not set!");