diff options
Diffstat (limited to 'fs/reiserfs/super.c')
-rw-r--r-- | fs/reiserfs/super.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c index 306e4e9d172d..5464ec517702 100644 --- a/fs/reiserfs/super.c +++ b/fs/reiserfs/super.c | |||
@@ -121,7 +121,7 @@ void reiserfs_schedule_old_flush(struct super_block *s) | |||
121 | * Avoid scheduling flush when sb is being shut down. It can race | 121 | * Avoid scheduling flush when sb is being shut down. It can race |
122 | * with journal shutdown and free still queued delayed work. | 122 | * with journal shutdown and free still queued delayed work. |
123 | */ | 123 | */ |
124 | if (s->s_flags & MS_RDONLY || !(s->s_flags & MS_ACTIVE)) | 124 | if (sb_rdonly(s) || !(s->s_flags & MS_ACTIVE)) |
125 | return; | 125 | return; |
126 | 126 | ||
127 | spin_lock(&sbi->old_work_lock); | 127 | spin_lock(&sbi->old_work_lock); |
@@ -151,7 +151,7 @@ static int reiserfs_freeze(struct super_block *s) | |||
151 | reiserfs_cancel_old_flush(s); | 151 | reiserfs_cancel_old_flush(s); |
152 | 152 | ||
153 | reiserfs_write_lock(s); | 153 | reiserfs_write_lock(s); |
154 | if (!(s->s_flags & MS_RDONLY)) { | 154 | if (!sb_rdonly(s)) { |
155 | int err = journal_begin(&th, s, 1); | 155 | int err = journal_begin(&th, s, 1); |
156 | if (err) { | 156 | if (err) { |
157 | reiserfs_block_writes(&th); | 157 | reiserfs_block_writes(&th); |
@@ -599,7 +599,7 @@ static void reiserfs_put_super(struct super_block *s) | |||
599 | * change file system state to current state if it was mounted | 599 | * change file system state to current state if it was mounted |
600 | * with read-write permissions | 600 | * with read-write permissions |
601 | */ | 601 | */ |
602 | if (!(s->s_flags & MS_RDONLY)) { | 602 | if (!sb_rdonly(s)) { |
603 | if (!journal_begin(&th, s, 10)) { | 603 | if (!journal_begin(&th, s, 10)) { |
604 | reiserfs_prepare_for_journal(s, SB_BUFFER_WITH_SB(s), | 604 | reiserfs_prepare_for_journal(s, SB_BUFFER_WITH_SB(s), |
605 | 1); | 605 | 1); |
@@ -700,7 +700,7 @@ static void reiserfs_dirty_inode(struct inode *inode, int flags) | |||
700 | 700 | ||
701 | int err = 0; | 701 | int err = 0; |
702 | 702 | ||
703 | if (inode->i_sb->s_flags & MS_RDONLY) { | 703 | if (sb_rdonly(inode->i_sb)) { |
704 | reiserfs_warning(inode->i_sb, "clm-6006", | 704 | reiserfs_warning(inode->i_sb, "clm-6006", |
705 | "writing inode %lu on readonly FS", | 705 | "writing inode %lu on readonly FS", |
706 | inode->i_ino); | 706 | inode->i_ino); |
@@ -1525,7 +1525,7 @@ static int reiserfs_remount(struct super_block *s, int *mount_flags, char *arg) | |||
1525 | reiserfs_write_unlock(s); | 1525 | reiserfs_write_unlock(s); |
1526 | reiserfs_xattr_init(s, *mount_flags); | 1526 | reiserfs_xattr_init(s, *mount_flags); |
1527 | /* remount read-only */ | 1527 | /* remount read-only */ |
1528 | if (s->s_flags & MS_RDONLY) | 1528 | if (sb_rdonly(s)) |
1529 | /* it is read-only already */ | 1529 | /* it is read-only already */ |
1530 | goto out_ok_unlocked; | 1530 | goto out_ok_unlocked; |
1531 | 1531 | ||
@@ -1551,7 +1551,7 @@ static int reiserfs_remount(struct super_block *s, int *mount_flags, char *arg) | |||
1551 | journal_mark_dirty(&th, SB_BUFFER_WITH_SB(s)); | 1551 | journal_mark_dirty(&th, SB_BUFFER_WITH_SB(s)); |
1552 | } else { | 1552 | } else { |
1553 | /* remount read-write */ | 1553 | /* remount read-write */ |
1554 | if (!(s->s_flags & MS_RDONLY)) { | 1554 | if (!sb_rdonly(s)) { |
1555 | reiserfs_write_unlock(s); | 1555 | reiserfs_write_unlock(s); |
1556 | reiserfs_xattr_init(s, *mount_flags); | 1556 | reiserfs_xattr_init(s, *mount_flags); |
1557 | goto out_ok_unlocked; /* We are read-write already */ | 1557 | goto out_ok_unlocked; /* We are read-write already */ |
@@ -1855,7 +1855,7 @@ static int what_hash(struct super_block *s) | |||
1855 | * the super | 1855 | * the super |
1856 | */ | 1856 | */ |
1857 | if (code != UNSET_HASH && | 1857 | if (code != UNSET_HASH && |
1858 | !(s->s_flags & MS_RDONLY) && | 1858 | !sb_rdonly(s) && |
1859 | code != sb_hash_function_code(SB_DISK_SUPER_BLOCK(s))) { | 1859 | code != sb_hash_function_code(SB_DISK_SUPER_BLOCK(s))) { |
1860 | set_sb_hash_function_code(SB_DISK_SUPER_BLOCK(s), code); | 1860 | set_sb_hash_function_code(SB_DISK_SUPER_BLOCK(s), code); |
1861 | } | 1861 | } |
@@ -2052,7 +2052,7 @@ static int reiserfs_fill_super(struct super_block *s, void *data, int silent) | |||
2052 | if (replay_only(s)) | 2052 | if (replay_only(s)) |
2053 | goto error_unlocked; | 2053 | goto error_unlocked; |
2054 | 2054 | ||
2055 | if (bdev_read_only(s->s_bdev) && !(s->s_flags & MS_RDONLY)) { | 2055 | if (bdev_read_only(s->s_bdev) && !sb_rdonly(s)) { |
2056 | SWARN(silent, s, "clm-7000", | 2056 | SWARN(silent, s, "clm-7000", |
2057 | "Detected readonly device, marking FS readonly"); | 2057 | "Detected readonly device, marking FS readonly"); |
2058 | s->s_flags |= MS_RDONLY; | 2058 | s->s_flags |= MS_RDONLY; |
@@ -2101,7 +2101,7 @@ static int reiserfs_fill_super(struct super_block *s, void *data, int silent) | |||
2101 | else | 2101 | else |
2102 | set_bit(REISERFS_3_6, &sbi->s_properties); | 2102 | set_bit(REISERFS_3_6, &sbi->s_properties); |
2103 | 2103 | ||
2104 | if (!(s->s_flags & MS_RDONLY)) { | 2104 | if (!sb_rdonly(s)) { |
2105 | 2105 | ||
2106 | errval = journal_begin(&th, s, 1); | 2106 | errval = journal_begin(&th, s, 1); |
2107 | if (errval) { | 2107 | if (errval) { |