Skip to content

Commit 87009d8

Browse files
Dmitry Monakhovtytso
authored andcommitted
ext4: do not try to grab the s_umount semaphore in ext4_quota_off
It's not needed to sync the filesystem, and it fixes a lock_dep complaint. Signed-off-by: Dmitry Monakhov <[email protected]> Signed-off-by: "Theodore Ts'o" <[email protected]> Reviewed-by: Jan Kara <[email protected]>
1 parent 83668e7 commit 87009d8

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

fs/ext4/super.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4570,12 +4570,10 @@ static int ext4_quota_on(struct super_block *sb, int type, int format_id,
45704570

45714571
static int ext4_quota_off(struct super_block *sb, int type)
45724572
{
4573-
/* Force all delayed allocation blocks to be allocated */
4574-
if (test_opt(sb, DELALLOC)) {
4575-
down_read(&sb->s_umount);
4573+
/* Force all delayed allocation blocks to be allocated.
4574+
* Caller already holds s_umount sem */
4575+
if (test_opt(sb, DELALLOC))
45764576
sync_filesystem(sb);
4577-
up_read(&sb->s_umount);
4578-
}
45794577

45804578
return dquot_quota_off(sb, type);
45814579
}

0 commit comments

Comments
 (0)