Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 188922
b: refs/heads/master
c: 3f8b5ee
h: refs/heads/master
v: v3
  • Loading branch information
Jeff Mahoney authored and Linus Torvalds committed Mar 24, 2010
1 parent e03df9b commit d9988e9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6cb4aff0a77cc0e6bae9475d62205319e3ebbf3f
refs/heads/master: 3f8b5ee33293d43ca360771b535dfae8c57259dc
15 changes: 9 additions & 6 deletions trunk/fs/reiserfs/journal.c
Original file line number Diff line number Diff line change
Expand Up @@ -2217,6 +2217,15 @@ static int journal_read_transaction(struct super_block *sb,
brelse(d_bh);
return 1;
}

if (bdev_read_only(sb->s_bdev)) {
reiserfs_warning(sb, "clm-2076",
"device is readonly, unable to replay log");
brelse(c_bh);
brelse(d_bh);
return -EROFS;
}

trans_id = get_desc_trans_id(desc);
/* now we know we've got a good transaction, and it was inside the valid time ranges */
log_blocks = kmalloc(get_desc_trans_len(desc) *
Expand Down Expand Up @@ -2459,12 +2468,6 @@ static int journal_read(struct super_block *sb)
goto start_log_replay;
}

if (continue_replay && bdev_read_only(sb->s_bdev)) {
reiserfs_warning(sb, "clm-2076",
"device is readonly, unable to replay log");
return -1;
}

/* ok, there are transactions that need to be replayed. start with the first log block, find
** all the valid transactions, and pick out the oldest.
*/
Expand Down

0 comments on commit d9988e9

Please sign in to comment.