Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs-2.6
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs-2.6: ext2: Resolve 'dereferencing pointer to incomplete type' when enabling EXT2_XATTR_DEBUG ext3: Remove redundant unlikely() ext2: Remove redundant unlikely() ext3: speed up file creates by optimizing rec_len functions ext2: speed up file creates by optimizing rec_len functions ext3: Add more journal error check ext3: Add journal error check in resize.c quota: Use %pV and __attribute__((format (printf in __quota_error and fix fallout ext3: Add FITRIM handling ext3: Add batched discard support for ext3 ext3: Add journal error check into ext3_rename() ext3: Use search_dirblock() in ext3_dx_find_entry() ext3: Avoid uninitialized memory references with a corrupted htree directory ext3: Return error code from generic_check_addressable ext3: Add journal error check into ext3_delete_entry() ext3: Add error check in ext3_mkdir() fs/ext3/super.c: Use printf extension %pV fs/ext2/super.c: Use printf extension %pV ext3: don't update sb journal_devnum when RO dev
This commit is contained in:
@@ -143,12 +143,16 @@ void ext3_journal_abort_handle(const char *caller, const char *err_fn,
|
||||
void ext3_msg(struct super_block *sb, const char *prefix,
|
||||
const char *fmt, ...)
|
||||
{
|
||||
struct va_format vaf;
|
||||
va_list args;
|
||||
|
||||
va_start(args, fmt);
|
||||
printk("%sEXT3-fs (%s): ", prefix, sb->s_id);
|
||||
vprintk(fmt, args);
|
||||
printk("\n");
|
||||
|
||||
vaf.fmt = fmt;
|
||||
vaf.va = &args;
|
||||
|
||||
printk("%sEXT3-fs (%s): %pV\n", prefix, sb->s_id, &vaf);
|
||||
|
||||
va_end(args);
|
||||
}
|
||||
|
||||
@@ -195,15 +199,20 @@ static void ext3_handle_error(struct super_block *sb)
|
||||
sb->s_id);
|
||||
}
|
||||
|
||||
void ext3_error (struct super_block * sb, const char * function,
|
||||
const char * fmt, ...)
|
||||
void ext3_error(struct super_block *sb, const char *function,
|
||||
const char *fmt, ...)
|
||||
{
|
||||
struct va_format vaf;
|
||||
va_list args;
|
||||
|
||||
va_start(args, fmt);
|
||||
printk(KERN_CRIT "EXT3-fs error (device %s): %s: ",sb->s_id, function);
|
||||
vprintk(fmt, args);
|
||||
printk("\n");
|
||||
|
||||
vaf.fmt = fmt;
|
||||
vaf.va = &args;
|
||||
|
||||
printk(KERN_CRIT "EXT3-fs error (device %s): %s: %pV\n",
|
||||
sb->s_id, function, &vaf);
|
||||
|
||||
va_end(args);
|
||||
|
||||
ext3_handle_error(sb);
|
||||
@@ -274,15 +283,20 @@ void __ext3_std_error (struct super_block * sb, const char * function,
|
||||
* case we take the easy way out and panic immediately.
|
||||
*/
|
||||
|
||||
void ext3_abort (struct super_block * sb, const char * function,
|
||||
const char * fmt, ...)
|
||||
void ext3_abort(struct super_block *sb, const char *function,
|
||||
const char *fmt, ...)
|
||||
{
|
||||
struct va_format vaf;
|
||||
va_list args;
|
||||
|
||||
va_start(args, fmt);
|
||||
printk(KERN_CRIT "EXT3-fs (%s): error: %s: ", sb->s_id, function);
|
||||
vprintk(fmt, args);
|
||||
printk("\n");
|
||||
|
||||
vaf.fmt = fmt;
|
||||
vaf.va = &args;
|
||||
|
||||
printk(KERN_CRIT "EXT3-fs (%s): error: %s: %pV\n",
|
||||
sb->s_id, function, &vaf);
|
||||
|
||||
va_end(args);
|
||||
|
||||
if (test_opt(sb, ERRORS_PANIC))
|
||||
@@ -300,16 +314,20 @@ void ext3_abort (struct super_block * sb, const char * function,
|
||||
journal_abort(EXT3_SB(sb)->s_journal, -EIO);
|
||||
}
|
||||
|
||||
void ext3_warning (struct super_block * sb, const char * function,
|
||||
const char * fmt, ...)
|
||||
void ext3_warning(struct super_block *sb, const char *function,
|
||||
const char *fmt, ...)
|
||||
{
|
||||
struct va_format vaf;
|
||||
va_list args;
|
||||
|
||||
va_start(args, fmt);
|
||||
printk(KERN_WARNING "EXT3-fs (%s): warning: %s: ",
|
||||
sb->s_id, function);
|
||||
vprintk(fmt, args);
|
||||
printk("\n");
|
||||
|
||||
vaf.fmt = fmt;
|
||||
vaf.va = &args;
|
||||
|
||||
printk(KERN_WARNING "EXT3-fs (%s): warning: %s: %pV\n",
|
||||
sb->s_id, function, &vaf);
|
||||
|
||||
va_end(args);
|
||||
}
|
||||
|
||||
@@ -1848,13 +1866,15 @@ static int ext3_fill_super (struct super_block *sb, void *data, int silent)
|
||||
goto failed_mount;
|
||||
}
|
||||
|
||||
if (generic_check_addressable(sb->s_blocksize_bits,
|
||||
le32_to_cpu(es->s_blocks_count))) {
|
||||
err = generic_check_addressable(sb->s_blocksize_bits,
|
||||
le32_to_cpu(es->s_blocks_count));
|
||||
if (err) {
|
||||
ext3_msg(sb, KERN_ERR,
|
||||
"error: filesystem is too large to mount safely");
|
||||
if (sizeof(sector_t) < 8)
|
||||
ext3_msg(sb, KERN_ERR,
|
||||
"error: CONFIG_LBDAF not enabled");
|
||||
ret = err;
|
||||
goto failed_mount;
|
||||
}
|
||||
|
||||
@@ -2297,7 +2317,7 @@ static int ext3_load_journal(struct super_block *sb,
|
||||
EXT3_SB(sb)->s_journal = journal;
|
||||
ext3_clear_journal_err(sb, es);
|
||||
|
||||
if (journal_devnum &&
|
||||
if (!really_read_only && journal_devnum &&
|
||||
journal_devnum != le32_to_cpu(es->s_journal_dev)) {
|
||||
es->s_journal_dev = cpu_to_le32(journal_devnum);
|
||||
|
||||
|
Reference in New Issue
Block a user