diff options
| author | Patrick McHardy <kaber@trash.net> | 2010-04-20 10:02:01 -0400 |
|---|---|---|
| committer | Patrick McHardy <kaber@trash.net> | 2010-04-20 10:02:01 -0400 |
| commit | 62910554656cdcd6b6f84a5154c4155aae4ca231 (patch) | |
| tree | dcf14004f6fd2ef7154362ff948bfeba0f3ea92d /fs/reiserfs/journal.c | |
| parent | 22265a5c3c103cf8c50be62e6c90d045eb649e6d (diff) | |
| parent | ab9304717f7624c41927f442e6b6d418b2d8b3e4 (diff) | |
Merge branch 'master' of /repos/git/net-next-2.6
Conflicts:
Documentation/feature-removal-schedule.txt
net/ipv6/netfilter/ip6t_REJECT.c
net/netfilter/xt_limit.c
Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'fs/reiserfs/journal.c')
| -rw-r--r-- | fs/reiserfs/journal.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/fs/reiserfs/journal.c b/fs/reiserfs/journal.c index ba98546fabbd..19fbc810e8e7 100644 --- a/fs/reiserfs/journal.c +++ b/fs/reiserfs/journal.c | |||
| @@ -50,6 +50,7 @@ | |||
| 50 | #include <linux/blkdev.h> | 50 | #include <linux/blkdev.h> |
| 51 | #include <linux/backing-dev.h> | 51 | #include <linux/backing-dev.h> |
| 52 | #include <linux/uaccess.h> | 52 | #include <linux/uaccess.h> |
| 53 | #include <linux/slab.h> | ||
| 53 | 54 | ||
| 54 | #include <asm/system.h> | 55 | #include <asm/system.h> |
| 55 | 56 | ||
| @@ -2217,6 +2218,15 @@ static int journal_read_transaction(struct super_block *sb, | |||
| 2217 | brelse(d_bh); | 2218 | brelse(d_bh); |
| 2218 | return 1; | 2219 | return 1; |
| 2219 | } | 2220 | } |
| 2221 | |||
| 2222 | if (bdev_read_only(sb->s_bdev)) { | ||
| 2223 | reiserfs_warning(sb, "clm-2076", | ||
| 2224 | "device is readonly, unable to replay log"); | ||
| 2225 | brelse(c_bh); | ||
| 2226 | brelse(d_bh); | ||
| 2227 | return -EROFS; | ||
| 2228 | } | ||
| 2229 | |||
| 2220 | trans_id = get_desc_trans_id(desc); | 2230 | 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 */ | 2231 | /* 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) * | 2232 | log_blocks = kmalloc(get_desc_trans_len(desc) * |
| @@ -2459,12 +2469,6 @@ static int journal_read(struct super_block *sb) | |||
| 2459 | goto start_log_replay; | 2469 | goto start_log_replay; |
| 2460 | } | 2470 | } |
| 2461 | 2471 | ||
| 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 | 2472 | /* 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. | 2473 | ** all the valid transactions, and pick out the oldest. |
| 2470 | */ | 2474 | */ |
