diff options
Diffstat (limited to 'fs/reiserfs')
-rw-r--r-- | fs/reiserfs/journal.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/fs/reiserfs/journal.c b/fs/reiserfs/journal.c index ba98546fabbd..f3de5e8a2ae8 100644 --- a/fs/reiserfs/journal.c +++ b/fs/reiserfs/journal.c | |||
@@ -2217,6 +2217,15 @@ static int journal_read_transaction(struct super_block *sb, | |||
2217 | brelse(d_bh); | 2217 | brelse(d_bh); |
2218 | return 1; | 2218 | return 1; |
2219 | } | 2219 | } |
2220 | |||
2221 | if (bdev_read_only(sb->s_bdev)) { | ||
2222 | reiserfs_warning(sb, "clm-2076", | ||
2223 | "device is readonly, unable to replay log"); | ||
2224 | brelse(c_bh); | ||
2225 | brelse(d_bh); | ||
2226 | return -EROFS; | ||
2227 | } | ||
2228 | |||
2220 | trans_id = get_desc_trans_id(desc); | 2229 | trans_id = get_desc_trans_id(desc); |
2221 | /* now we know we've got a good transaction, and it was inside the valid time ranges */ | 2230 | /* now we know we've got a good transaction, and it was inside the valid time ranges */ |
2222 | log_blocks = kmalloc(get_desc_trans_len(desc) * | 2231 | log_blocks = kmalloc(get_desc_trans_len(desc) * |
@@ -2459,12 +2468,6 @@ static int journal_read(struct super_block *sb) | |||
2459 | goto start_log_replay; | 2468 | goto start_log_replay; |
2460 | } | 2469 | } |
2461 | 2470 | ||
2462 | if (continue_replay && bdev_read_only(sb->s_bdev)) { | ||
2463 | reiserfs_warning(sb, "clm-2076", | ||
2464 | "device is readonly, unable to replay log"); | ||
2465 | return -1; | ||
2466 | } | ||
2467 | |||
2468 | /* ok, there are transactions that need to be replayed. start with the first log block, find | 2471 | /* ok, there are transactions that need to be replayed. start with the first log block, find |
2469 | ** all the valid transactions, and pick out the oldest. | 2472 | ** all the valid transactions, and pick out the oldest. |
2470 | */ | 2473 | */ |