|
Kmods SIG |
8b815c |
From 0cde7e81cd448a5df01a3960f6608b15dc3f12a3 Mon Sep 17 00:00:00 2001
|
|
Kmods SIG |
8b815c |
From: Kari Argillander <kari.argillander@gmail.com>
|
|
Kmods SIG |
8b815c |
Date: Thu, 9 Sep 2021 21:09:38 +0300
|
|
Kmods SIG |
8b815c |
Subject: [Backport 0cde7e81cd44] src: Remove tmp var is_ro in
|
|
Kmods SIG |
8b815c |
ntfs_fill_super
|
|
Kmods SIG |
8b815c |
|
|
Kmods SIG |
8b815c |
We only use this in two places so we do not really need it. Also
|
|
Kmods SIG |
8b815c |
wrapper sb_rdonly() is pretty self explanatory. This will make little
|
|
Kmods SIG |
8b815c |
bit easier to read this super long variable list in the beginning of
|
|
Kmods SIG |
8b815c |
ntfs_fill_super().
|
|
Kmods SIG |
8b815c |
|
|
Kmods SIG |
8b815c |
Signed-off-by: Kari Argillander <kari.argillander@gmail.com>
|
|
Kmods SIG |
8b815c |
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
|
|
Kmods SIG |
8b815c |
---
|
|
Kmods SIG |
8b815c |
src/super.c | 7 ++-----
|
|
Kmods SIG |
8b815c |
1 file changed, 2 insertions(+), 5 deletions(-)
|
|
Kmods SIG |
8b815c |
|
|
Kmods SIG |
8b815c |
diff --git a/src/super.c b/src/super.c
|
|
Kmods SIG |
8b815c |
index c18705bf857f6f58c56c619a9702fa02dc7a30b6..93b8a1f4d7483210eeac016f2fb8abaa7e5d8b2c 100644
|
|
Kmods SIG |
8b815c |
--- a/src/super.c
|
|
Kmods SIG |
8b815c |
+++ b/src/super.c
|
|
Kmods SIG |
8b815c |
@@ -887,7 +887,6 @@ static int ntfs_fill_super(struct super_block *sb, struct fs_context *fc)
|
|
Kmods SIG |
8b815c |
struct ATTR_DEF_ENTRY *t;
|
|
Kmods SIG |
8b815c |
u16 *upcase;
|
|
Kmods SIG |
8b815c |
u16 *shared;
|
|
Kmods SIG |
8b815c |
- bool is_ro;
|
|
Kmods SIG |
8b815c |
struct MFT_REF ref;
|
|
Kmods SIG |
8b815c |
|
|
Kmods SIG |
8b815c |
ref.high = 0;
|
|
Kmods SIG |
8b815c |
@@ -1010,16 +1009,14 @@ static int ntfs_fill_super(struct super_block *sb, struct fs_context *fc)
|
|
Kmods SIG |
8b815c |
|
|
Kmods SIG |
8b815c |
iput(inode);
|
|
Kmods SIG |
8b815c |
|
|
Kmods SIG |
8b815c |
- is_ro = sb_rdonly(sb);
|
|
Kmods SIG |
8b815c |
-
|
|
Kmods SIG |
8b815c |
if (sbi->flags & NTFS_FLAGS_NEED_REPLAY) {
|
|
Kmods SIG |
8b815c |
- if (!is_ro) {
|
|
Kmods SIG |
8b815c |
+ if (!sb_rdonly(sb)) {
|
|
Kmods SIG |
8b815c |
ntfs_warn(sb,
|
|
Kmods SIG |
8b815c |
"failed to replay log file. Can't mount rw!");
|
|
Kmods SIG |
8b815c |
return -EINVAL;
|
|
Kmods SIG |
8b815c |
}
|
|
Kmods SIG |
8b815c |
} else if (sbi->volume.flags & VOLUME_FLAG_DIRTY) {
|
|
Kmods SIG |
8b815c |
- if (!is_ro && !sbi->options->force) {
|
|
Kmods SIG |
8b815c |
+ if (!sb_rdonly(sb) && !sbi->options->force) {
|
|
Kmods SIG |
8b815c |
ntfs_warn(
|
|
Kmods SIG |
8b815c |
sb,
|
|
Kmods SIG |
8b815c |
"volume is dirty and \"force\" flag is not set!");
|
|
Kmods SIG |
8b815c |
--
|
|
Kmods SIG |
8b815c |
2.31.1
|
|
Kmods SIG |
8b815c |
|