diff options
Diffstat (limited to 'fs/reiserfs')
-rw-r--r-- | fs/reiserfs/inode.c | 2 | ||||
-rw-r--r-- | fs/reiserfs/journal.c | 2 | ||||
-rw-r--r-- | fs/reiserfs/prints.c | 2 | ||||
-rw-r--r-- | fs/reiserfs/super.c | 18 |
4 files changed, 12 insertions, 12 deletions
diff --git a/fs/reiserfs/inode.c b/fs/reiserfs/inode.c index 873fc04e9403..11a48affa882 100644 --- a/fs/reiserfs/inode.c +++ b/fs/reiserfs/inode.c | |||
@@ -1776,7 +1776,7 @@ int reiserfs_write_inode(struct inode *inode, struct writeback_control *wbc) | |||
1776 | struct reiserfs_transaction_handle th; | 1776 | struct reiserfs_transaction_handle th; |
1777 | int jbegin_count = 1; | 1777 | int jbegin_count = 1; |
1778 | 1778 | ||
1779 | if (inode->i_sb->s_flags & MS_RDONLY) | 1779 | if (sb_rdonly(inode->i_sb)) |
1780 | return -EROFS; | 1780 | return -EROFS; |
1781 | /* | 1781 | /* |
1782 | * memory pressure can sometimes initiate write_inode calls with | 1782 | * memory pressure can sometimes initiate write_inode calls with |
diff --git a/fs/reiserfs/journal.c b/fs/reiserfs/journal.c index 0c882a0e2a6e..f59c667df15b 100644 --- a/fs/reiserfs/journal.c +++ b/fs/reiserfs/journal.c | |||
@@ -1918,7 +1918,7 @@ static int do_journal_release(struct reiserfs_transaction_handle *th, | |||
1918 | * we only want to flush out transactions if we were | 1918 | * we only want to flush out transactions if we were |
1919 | * called with error == 0 | 1919 | * called with error == 0 |
1920 | */ | 1920 | */ |
1921 | if (!error && !(sb->s_flags & MS_RDONLY)) { | 1921 | if (!error && !sb_rdonly(sb)) { |
1922 | /* end the current trans */ | 1922 | /* end the current trans */ |
1923 | BUG_ON(!th->t_trans_id); | 1923 | BUG_ON(!th->t_trans_id); |
1924 | do_journal_end(th, FLUSH_ALL); | 1924 | do_journal_end(th, FLUSH_ALL); |
diff --git a/fs/reiserfs/prints.c b/fs/reiserfs/prints.c index 4f3f928076f3..64f49cafbc5b 100644 --- a/fs/reiserfs/prints.c +++ b/fs/reiserfs/prints.c | |||
@@ -386,7 +386,7 @@ void __reiserfs_error(struct super_block *sb, const char *id, | |||
386 | printk(KERN_CRIT "REISERFS error (device %s): %s: %s\n", | 386 | printk(KERN_CRIT "REISERFS error (device %s): %s: %s\n", |
387 | sb->s_id, function, error_buf); | 387 | sb->s_id, function, error_buf); |
388 | 388 | ||
389 | if (sb->s_flags & MS_RDONLY) | 389 | if (sb_rdonly(sb)) |
390 | return; | 390 | return; |
391 | 391 | ||
392 | reiserfs_info(sb, "Remounting filesystem read-only\n"); | 392 | reiserfs_info(sb, "Remounting filesystem read-only\n"); |
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) { |