diff options
| author | Thomas Gleixner <tglx@linutronix.de> | 2010-05-10 11:59:37 +0200 | 
|---|---|---|
| committer | Thomas Gleixner <tglx@linutronix.de> | 2010-05-10 14:20:42 +0200 | 
| commit | dbb6be6d5e974c42bbecd183effaa0df69e1dd8b (patch) | |
| tree | 5735cb47e70853d057a9881dd0ce44b83e88fa63 /fs/reiserfs/journal.c | |
| parent | 6a867a395558a7f882d041783e4cdea6744ca2bf (diff) | |
| parent | b57f95a38233a2e73b679bea4a5453a1cc2a1cc9 (diff) | |
| download | olio-linux-3.10-dbb6be6d5e974c42bbecd183effaa0df69e1dd8b.tar.xz olio-linux-3.10-dbb6be6d5e974c42bbecd183effaa0df69e1dd8b.zip  | |
Merge branch 'linus' into timers/core
Reason: Further posix_cpu_timer patches depend on mainline changes
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
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 ba98546fabb..19fbc810e8e 100644 --- a/fs/reiserfs/journal.c +++ b/fs/reiserfs/journal.c @@ -50,6 +50,7 @@  #include <linux/blkdev.h>  #include <linux/backing-dev.h>  #include <linux/uaccess.h> +#include <linux/slab.h>  #include <asm/system.h> @@ -2217,6 +2218,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) * @@ -2459,12 +2469,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.  	 */  |