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
5 changed files with 9 additions and 7 deletions
|
@ -118,7 +118,6 @@ void ext2_free_inode (struct inode * inode)
|
||||||
* as writing the quota to disk may need the lock as well.
|
* as writing the quota to disk may need the lock as well.
|
||||||
*/
|
*/
|
||||||
/* Quota is already initialized in iput() */
|
/* Quota is already initialized in iput() */
|
||||||
ext2_xattr_delete_inode(inode);
|
|
||||||
dquot_free_inode(inode);
|
dquot_free_inode(inode);
|
||||||
dquot_drop(inode);
|
dquot_drop(inode);
|
||||||
|
|
||||||
|
|
|
@ -34,6 +34,7 @@
|
||||||
#include "ext2.h"
|
#include "ext2.h"
|
||||||
#include "acl.h"
|
#include "acl.h"
|
||||||
#include "xip.h"
|
#include "xip.h"
|
||||||
|
#include "xattr.h"
|
||||||
|
|
||||||
static int __ext2_write_inode(struct inode *inode, int do_sync);
|
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;
|
inode->i_size = 0;
|
||||||
if (inode->i_blocks)
|
if (inode->i_blocks)
|
||||||
ext2_truncate_blocks(inode, 0);
|
ext2_truncate_blocks(inode, 0);
|
||||||
|
ext2_xattr_delete_inode(inode);
|
||||||
}
|
}
|
||||||
|
|
||||||
invalidate_inode_buffers(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;
|
return bdev;
|
||||||
|
|
||||||
fail:
|
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));
|
__bdevname(dev, b), PTR_ERR(bdev));
|
||||||
|
|
||||||
return NULL;
|
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 */
|
/*todo: use simple_strtoll with >32bit ext3 */
|
||||||
sb_block = simple_strtoul(options, &options, 0);
|
sb_block = simple_strtoul(options, &options, 0);
|
||||||
if (*options && *options != ',') {
|
if (*options && *options != ',') {
|
||||||
ext3_msg(sb, "error: invalid sb specification: %s",
|
ext3_msg(sb, KERN_ERR, "error: invalid sb specification: %s",
|
||||||
(char *) *data);
|
(char *) *data);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1439,8 +1439,11 @@ static void __dquot_initialize(struct inode *inode, int type)
|
||||||
* did a write before quota was turned on
|
* did a write before quota was turned on
|
||||||
*/
|
*/
|
||||||
rsv = inode_get_rsv_space(inode);
|
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);
|
dquot_resv_space(inode->i_dquot[cnt], rsv);
|
||||||
|
spin_unlock(&dq_data_lock);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
out_err:
|
out_err:
|
||||||
|
|
|
@ -1147,8 +1147,7 @@ static int reiserfs_parse_options(struct super_block *s, char *options, /* strin
|
||||||
"on filesystem root.");
|
"on filesystem root.");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
qf_names[qtype] =
|
qf_names[qtype] = kstrdup(arg, GFP_KERNEL);
|
||||||
kmalloc(strlen(arg) + 1, GFP_KERNEL);
|
|
||||||
if (!qf_names[qtype]) {
|
if (!qf_names[qtype]) {
|
||||||
reiserfs_warning(s, "reiserfs-2502",
|
reiserfs_warning(s, "reiserfs-2502",
|
||||||
"not enough memory "
|
"not enough memory "
|
||||||
|
@ -1156,7 +1155,6 @@ static int reiserfs_parse_options(struct super_block *s, char *options, /* strin
|
||||||
"quotafile name.");
|
"quotafile name.");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
strcpy(qf_names[qtype], arg);
|
|
||||||
if (qtype == USRQUOTA)
|
if (qtype == USRQUOTA)
|
||||||
*mount_options |= 1 << REISERFS_USRQUOTA;
|
*mount_options |= 1 << REISERFS_USRQUOTA;
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Reference in a new issue