Skip to content

Commit 97ec56d

Browse files
fs/ntfs3: ntfs3_forced_shutdown use int instead of bool
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
1 parent 6c3684e commit 97ec56d

3 files changed

Lines changed: 6 additions & 5 deletions

File tree

fs/ntfs3/fsntfs.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -853,7 +853,8 @@ void ntfs_update_mftmirr(struct ntfs_sb_info *sbi, int wait)
853853
/*
854854
* sb can be NULL here. In this case sbi->flags should be 0 too.
855855
*/
856-
if (!sb || !(sbi->flags & NTFS_FLAGS_MFTMIRR))
856+
if (!sb || !(sbi->flags & NTFS_FLAGS_MFTMIRR) ||
857+
unlikely(ntfs3_forced_shutdown(sb)))
857858
return;
858859

859860
blocksize = sb->s_blocksize;

fs/ntfs3/ntfs_fs.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ enum utf16_endian;
6262
/* sbi->flags */
6363
#define NTFS_FLAGS_NODISCARD 0x00000001
6464
/* ntfs in shutdown state. */
65-
#define NTFS_FLAGS_SHUTDOWN 0x00000002
65+
#define NTFS_FLAGS_SHUTDOWN_BIT 0x00000002 /* == 4*/
6666
/* Set when LogFile is replaying. */
6767
#define NTFS_FLAGS_LOG_REPLAYING 0x00000008
6868
/* Set when we changed first MFT's which copy must be updated in $MftMirr. */
@@ -1001,9 +1001,9 @@ static inline struct ntfs_sb_info *ntfs_sb(struct super_block *sb)
10011001
return sb->s_fs_info;
10021002
}
10031003

1004-
static inline bool ntfs3_forced_shutdown(struct super_block *sb)
1004+
static inline int ntfs3_forced_shutdown(struct super_block *sb)
10051005
{
1006-
return test_bit(NTFS_FLAGS_SHUTDOWN, &ntfs_sb(sb)->flags);
1006+
return test_bit(NTFS_FLAGS_SHUTDOWN_BIT, &ntfs_sb(sb)->flags);
10071007
}
10081008

10091009
/*

fs/ntfs3/super.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -719,7 +719,7 @@ static int ntfs_show_options(struct seq_file *m, struct dentry *root)
719719
*/
720720
static void ntfs_shutdown(struct super_block *sb)
721721
{
722-
set_bit(NTFS_FLAGS_SHUTDOWN, &ntfs_sb(sb)->flags);
722+
set_bit(NTFS_FLAGS_SHUTDOWN_BIT, &ntfs_sb(sb)->flags);
723723
}
724724

725725
/*

0 commit comments

Comments
 (0)