Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs
Pull ext2, ext3, reiserfs, quota fixes from Jan Kara: "A fix for regression in ext2, and a format string issue in ext3. The rest isn't too serious." * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: ext2: Fix BUG_ON in evict() on inode deletion reiserfs: Use kstrdup instead of kmalloc/strcpy ext3: Fix format string issues quota: add missing use of dq_data_lock in __dquot_initialize
This commit is contained in:
commit
40e4591d94
|
@ -118,7 +118,6 @@ void ext2_free_inode (struct inode * inode)
|
|||
* as writing the quota to disk may need the lock as well.
|
||||
*/
|
||||
/* Quota is already initialized in iput() */
|
||||
ext2_xattr_delete_inode(inode);
|
||||
dquot_free_inode(inode);
|
||||
dquot_drop(inode);
|
||||
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
#include "ext2.h"
|
||||
#include "acl.h"
|
||||
#include "xip.h"
|
||||
#include "xattr.h"
|
||||
|
||||
static int __ext2_write_inode(struct inode *inode, int do_sync);
|
||||
|
||||
|
@ -88,6 +89,7 @@ void ext2_evict_inode(struct inode * inode)
|
|||
inode->i_size = 0;
|
||||
if (inode->i_blocks)
|
||||
ext2_truncate_blocks(inode, 0);
|
||||
ext2_xattr_delete_inode(inode);
|
||||
}
|
||||
|
||||
invalidate_inode_buffers(inode);
|
||||
|
|
|
@ -353,7 +353,7 @@ static struct block_device *ext3_blkdev_get(dev_t dev, struct super_block *sb)
|
|||
return bdev;
|
||||
|
||||
fail:
|
||||
ext3_msg(sb, "error: failed to open journal device %s: %ld",
|
||||
ext3_msg(sb, KERN_ERR, "error: failed to open journal device %s: %ld",
|
||||
__bdevname(dev, b), PTR_ERR(bdev));
|
||||
|
||||
return NULL;
|
||||
|
@ -887,7 +887,7 @@ static ext3_fsblk_t get_sb_block(void **data, struct super_block *sb)
|
|||
/*todo: use simple_strtoll with >32bit ext3 */
|
||||
sb_block = simple_strtoul(options, &options, 0);
|
||||
if (*options && *options != ',') {
|
||||
ext3_msg(sb, "error: invalid sb specification: %s",
|
||||
ext3_msg(sb, KERN_ERR, "error: invalid sb specification: %s",
|
||||
(char *) *data);
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -1439,8 +1439,11 @@ static void __dquot_initialize(struct inode *inode, int type)
|
|||
* did a write before quota was turned on
|
||||
*/
|
||||
rsv = inode_get_rsv_space(inode);
|
||||
if (unlikely(rsv))
|
||||
if (unlikely(rsv)) {
|
||||
spin_lock(&dq_data_lock);
|
||||
dquot_resv_space(inode->i_dquot[cnt], rsv);
|
||||
spin_unlock(&dq_data_lock);
|
||||
}
|
||||
}
|
||||
}
|
||||
out_err:
|
||||
|
|
|
@ -1147,8 +1147,7 @@ static int reiserfs_parse_options(struct super_block *s, char *options, /* strin
|
|||
"on filesystem root.");
|
||||
return 0;
|
||||
}
|
||||
qf_names[qtype] =
|
||||
kmalloc(strlen(arg) + 1, GFP_KERNEL);
|
||||
qf_names[qtype] = kstrdup(arg, GFP_KERNEL);
|
||||
if (!qf_names[qtype]) {
|
||||
reiserfs_warning(s, "reiserfs-2502",
|
||||
"not enough memory "
|
||||
|
@ -1156,7 +1155,6 @@ static int reiserfs_parse_options(struct super_block *s, char *options, /* strin
|
|||
"quotafile name.");
|
||||
return 0;
|
||||
}
|
||||
strcpy(qf_names[qtype], arg);
|
||||
if (qtype == USRQUOTA)
|
||||
*mount_options |= 1 << REISERFS_USRQUOTA;
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue