diff mbox

ext4: do not get s_umount sem on ext4_quota_off

Message ID 87tyk6ln54.fsf@dmon-lap.sw.ru
State Accepted, archived
Headers show

Commit Message

Dmitry Monakhov Oct. 28, 2010, 8:47 a.m. UTC
It must be already acquired by caller. Fix lock_dep complain.

Signed-off-by: Dmitry Monakhov <dmonakhov@gmail.com>
Reviewed-by: Jan Kara <jack@suse.cz>

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Theodore Ts'o Nov. 3, 2010, 7:51 p.m. UTC | #1
On Thu, Oct 28, 2010 at 12:47:19PM +0400, Dmitry Monakhov wrote:
> 
> It must be already acquired by caller. Fix lock_dep complain.
> 
> Signed-off-by: Dmitry Monakhov <dmonakhov@gmail.com>
> Reviewed-by: Jan Kara <jack@suse.cz>

Added to the patch queue, thanks.

					- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index e59eb37..062d1bc 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -4107,12 +4107,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);
 }