forked from Minki/linux
\n
-----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEq1nRK9aeMoq1VSgcnJ2qBz9kQNkFAlwbniUACgkQnJ2qBz9k QNlACwgA0d/OoJesmZPihnRmFWTScvtXlxsf9NJOmoANaxRA1uToEQsrFmFeUXf+ vrdVwCfVLUACF9mgp1KB/m7HNUHlFps+DBnLZ2XbgIqKKHLANllDujA6v36ZEbAJ h71KggrYHw8GUjEvOURp5DBOBzdqzp5dS17NNaJquxeXmATx8rGaxszo3/J9zNXv 8GZsVBuD9aZg+1XpusnztzR1MbRc0OtQ0GEryTO/t3LGBN5og8YLxZ6rlZUvO2Qu x5OmNKU/VGKRPo3boU2dFozeHFPyQTcZdBa/66JI5wzt/qyTinyvyLbhu0fcA98/ U7plgtz8F7wYZXy321ywkvWNY2aALw== =rJYy -----END PGP SIGNATURE----- Merge tag 'fs_for_4.21-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs Pull ext2, udf, and quota update from Jan Kara: "Some ext2 cleanups, a fix for UDF crash on corrupted media, and one quota locking fix" * tag 'fs_for_4.21-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: quota: Lock s_umount in exclusive mode for Q_XQUOTA{ON,OFF} quotactls. udf: Fix BUG on corrupted inode ext2: change reusable parameter to true when calling mb_cache_entry_create() ext2: remove redundant condition check ext2: avoid unnecessary operation in ext2_error()
This commit is contained in:
commit
e01799ac56
@ -73,7 +73,7 @@ void ext2_error(struct super_block *sb, const char *function,
|
|||||||
|
|
||||||
if (test_opt(sb, ERRORS_PANIC))
|
if (test_opt(sb, ERRORS_PANIC))
|
||||||
panic("EXT2-fs: panic from previous error\n");
|
panic("EXT2-fs: panic from previous error\n");
|
||||||
if (test_opt(sb, ERRORS_RO)) {
|
if (!sb_rdonly(sb) && test_opt(sb, ERRORS_RO)) {
|
||||||
ext2_msg(sb, KERN_CRIT,
|
ext2_msg(sb, KERN_CRIT,
|
||||||
"error: remounting filesystem read-only");
|
"error: remounting filesystem read-only");
|
||||||
sb->s_flags |= SB_RDONLY;
|
sb->s_flags |= SB_RDONLY;
|
||||||
@ -148,10 +148,9 @@ static void ext2_put_super (struct super_block * sb)
|
|||||||
|
|
||||||
ext2_quota_off_umount(sb);
|
ext2_quota_off_umount(sb);
|
||||||
|
|
||||||
if (sbi->s_ea_block_cache) {
|
ext2_xattr_destroy_cache(sbi->s_ea_block_cache);
|
||||||
ext2_xattr_destroy_cache(sbi->s_ea_block_cache);
|
sbi->s_ea_block_cache = NULL;
|
||||||
sbi->s_ea_block_cache = NULL;
|
|
||||||
}
|
|
||||||
if (!sb_rdonly(sb)) {
|
if (!sb_rdonly(sb)) {
|
||||||
struct ext2_super_block *es = sbi->s_es;
|
struct ext2_super_block *es = sbi->s_es;
|
||||||
|
|
||||||
@ -1198,8 +1197,7 @@ cantfind_ext2:
|
|||||||
sb->s_id);
|
sb->s_id);
|
||||||
goto failed_mount;
|
goto failed_mount;
|
||||||
failed_mount3:
|
failed_mount3:
|
||||||
if (sbi->s_ea_block_cache)
|
ext2_xattr_destroy_cache(sbi->s_ea_block_cache);
|
||||||
ext2_xattr_destroy_cache(sbi->s_ea_block_cache);
|
|
||||||
percpu_counter_destroy(&sbi->s_freeblocks_counter);
|
percpu_counter_destroy(&sbi->s_freeblocks_counter);
|
||||||
percpu_counter_destroy(&sbi->s_freeinodes_counter);
|
percpu_counter_destroy(&sbi->s_freeinodes_counter);
|
||||||
percpu_counter_destroy(&sbi->s_dirs_counter);
|
percpu_counter_destroy(&sbi->s_dirs_counter);
|
||||||
|
@ -835,7 +835,8 @@ ext2_xattr_cache_insert(struct mb_cache *cache, struct buffer_head *bh)
|
|||||||
__u32 hash = le32_to_cpu(HDR(bh)->h_hash);
|
__u32 hash = le32_to_cpu(HDR(bh)->h_hash);
|
||||||
int error;
|
int error;
|
||||||
|
|
||||||
error = mb_cache_entry_create(cache, GFP_NOFS, hash, bh->b_blocknr, 1);
|
error = mb_cache_entry_create(cache, GFP_NOFS, hash, bh->b_blocknr,
|
||||||
|
true);
|
||||||
if (error) {
|
if (error) {
|
||||||
if (error == -EBUSY) {
|
if (error == -EBUSY) {
|
||||||
ea_bdebug(bh, "already in cache (%d cache entries)",
|
ea_bdebug(bh, "already in cache (%d cache entries)",
|
||||||
|
@ -791,7 +791,8 @@ static int quotactl_cmd_write(int cmd)
|
|||||||
/* Return true if quotactl command is manipulating quota on/off state */
|
/* Return true if quotactl command is manipulating quota on/off state */
|
||||||
static bool quotactl_cmd_onoff(int cmd)
|
static bool quotactl_cmd_onoff(int cmd)
|
||||||
{
|
{
|
||||||
return (cmd == Q_QUOTAON) || (cmd == Q_QUOTAOFF);
|
return (cmd == Q_QUOTAON) || (cmd == Q_QUOTAOFF) ||
|
||||||
|
(cmd == Q_XQUOTAON) || (cmd == Q_XQUOTAOFF);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1357,6 +1357,12 @@ reread:
|
|||||||
|
|
||||||
iinfo->i_alloc_type = le16_to_cpu(fe->icbTag.flags) &
|
iinfo->i_alloc_type = le16_to_cpu(fe->icbTag.flags) &
|
||||||
ICBTAG_FLAG_AD_MASK;
|
ICBTAG_FLAG_AD_MASK;
|
||||||
|
if (iinfo->i_alloc_type != ICBTAG_FLAG_AD_SHORT &&
|
||||||
|
iinfo->i_alloc_type != ICBTAG_FLAG_AD_LONG &&
|
||||||
|
iinfo->i_alloc_type != ICBTAG_FLAG_AD_IN_ICB) {
|
||||||
|
ret = -EIO;
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
iinfo->i_unique = 0;
|
iinfo->i_unique = 0;
|
||||||
iinfo->i_lenEAttr = 0;
|
iinfo->i_lenEAttr = 0;
|
||||||
iinfo->i_lenExtents = 0;
|
iinfo->i_lenExtents = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user