Skip to content

Commit

Permalink
ext4: do not try to grab the s_umount semaphore in ext4_quota_off
Browse files Browse the repository at this point in the history
It's not needed to sync the filesystem, and it fixes a lock_dep complaint.

Signed-off-by: Dmitry Monakhov <dmonakhov@gmail.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Reviewed-by: Jan Kara <jack@suse.cz>
  • Loading branch information
Dmitry Monakhov authored and Theodore Ts'o committed Nov 8, 2010
1 parent 83668e7 commit 87009d8
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions fs/ext4/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -4570,12 +4570,10 @@ static int ext4_quota_on(struct super_block *sb, int type, int format_id,

static int ext4_quota_off(struct super_block *sb, int type)
{
/* Force all delayed allocation blocks to be allocated */
if (test_opt(sb, DELALLOC)) {
down_read(&sb->s_umount);
/* Force all delayed allocation blocks to be allocated.
* Caller already holds s_umount sem */
if (test_opt(sb, DELALLOC))
sync_filesystem(sb);
up_read(&sb->s_umount);
}

return dquot_quota_off(sb, type);
}
Expand Down

0 comments on commit 87009d8

Please sign in to comment.