Skip to content

Commit 8fc1c59

Browse files
committed
Merge tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4
Pull ext4 fix from Ted Ts'o: "Fix an ext4 regression which breaks remounting r/w file systems that have the quota feature enabled" * tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: ext4: only check dquot_initialize_needed() when debugging Revert "ext4: don't clear SB_RDONLY when remounting r/w until quota is re-enabled"
2 parents 33f2b57 + dea9d8f commit 8fc1c59

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

fs/ext4/super.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6388,7 +6388,6 @@ static int __ext4_remount(struct fs_context *fc, struct super_block *sb)
63886388
struct ext4_mount_options old_opts;
63896389
ext4_group_t g;
63906390
int err = 0;
6391-
int enable_rw = 0;
63926391
#ifdef CONFIG_QUOTA
63936392
int enable_quota = 0;
63946393
int i, j;
@@ -6575,7 +6574,7 @@ static int __ext4_remount(struct fs_context *fc, struct super_block *sb)
65756574
if (err)
65766575
goto restore_opts;
65776576

6578-
enable_rw = 1;
6577+
sb->s_flags &= ~SB_RDONLY;
65796578
if (ext4_has_feature_mmp(sb)) {
65806579
err = ext4_multi_mount_protect(sb,
65816580
le64_to_cpu(es->s_mmp_block));
@@ -6622,9 +6621,6 @@ static int __ext4_remount(struct fs_context *fc, struct super_block *sb)
66226621
if (!test_opt(sb, BLOCK_VALIDITY) && sbi->s_system_blks)
66236622
ext4_release_system_zone(sb);
66246623

6625-
if (enable_rw)
6626-
sb->s_flags &= ~SB_RDONLY;
6627-
66286624
/*
66296625
* Reinitialize lazy itable initialization thread based on
66306626
* current settings

fs/ext4/xattr.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2056,8 +2056,9 @@ ext4_xattr_block_set(handle_t *handle, struct inode *inode,
20562056
else {
20572057
u32 ref;
20582058

2059+
#ifdef EXT4_XATTR_DEBUG
20592060
WARN_ON_ONCE(dquot_initialize_needed(inode));
2060-
2061+
#endif
20612062
/* The old block is released after updating
20622063
the inode. */
20632064
error = dquot_alloc_block(inode,
@@ -2120,8 +2121,9 @@ ext4_xattr_block_set(handle_t *handle, struct inode *inode,
21202121
/* We need to allocate a new block */
21212122
ext4_fsblk_t goal, block;
21222123

2124+
#ifdef EXT4_XATTR_DEBUG
21232125
WARN_ON_ONCE(dquot_initialize_needed(inode));
2124-
2126+
#endif
21252127
goal = ext4_group_first_block_no(sb,
21262128
EXT4_I(inode)->i_block_group);
21272129
block = ext4_new_meta_blocks(handle, inode, goal, 0,

0 commit comments

Comments
 (0)