未验证 提交 0cde7e81 编写于 作者: K Kari Argillander 提交者: Konstantin Komarov

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: NKari Argillander <kari.argillander@gmail.com>
Signed-off-by: NKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
上级 b4f110d6
...@@ -887,7 +887,6 @@ static int ntfs_fill_super(struct super_block *sb, struct fs_context *fc) ...@@ -887,7 +887,6 @@ static int ntfs_fill_super(struct super_block *sb, struct fs_context *fc)
struct ATTR_DEF_ENTRY *t; struct ATTR_DEF_ENTRY *t;
u16 *upcase; u16 *upcase;
u16 *shared; u16 *shared;
bool is_ro;
struct MFT_REF ref; struct MFT_REF ref;
ref.high = 0; ref.high = 0;
...@@ -1010,16 +1009,14 @@ static int ntfs_fill_super(struct super_block *sb, struct fs_context *fc) ...@@ -1010,16 +1009,14 @@ static int ntfs_fill_super(struct super_block *sb, struct fs_context *fc)
iput(inode); iput(inode);
is_ro = sb_rdonly(sb);
if (sbi->flags & NTFS_FLAGS_NEED_REPLAY) { if (sbi->flags & NTFS_FLAGS_NEED_REPLAY) {
if (!is_ro) { if (!sb_rdonly(sb)) {
ntfs_warn(sb, ntfs_warn(sb,
"failed to replay log file. Can't mount rw!"); "failed to replay log file. Can't mount rw!");
return -EINVAL; return -EINVAL;
} }
} else if (sbi->volume.flags & VOLUME_FLAG_DIRTY) { } else if (sbi->volume.flags & VOLUME_FLAG_DIRTY) {
if (!is_ro && !sbi->options->force) { if (!sb_rdonly(sb) && !sbi->options->force) {
ntfs_warn( ntfs_warn(
sb, sb,
"volume is dirty and \"force\" flag is not set!"); "volume is dirty and \"force\" flag is not set!");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册