]> git.baikalelectronics.ru Git - kernel.git/commit
ext4: re-enable -o discard functionality in no-journal mode
authorTheodore Ts'o <tytso@mit.edu>
Tue, 18 Sep 2012 17:33:44 +0000 (13:33 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 18 Sep 2012 17:33:44 +0000 (13:33 -0400)
commitee77296f76155d1c5d3495f913a079edbe8253af
treed442a7cc61a579fd500a39fa478dac7427bc1226
parentb5d271d3b2604dc5317432a1020b7507bc6864b4
ext4: re-enable -o discard functionality in no-journal mode

This is a revert of commit 29d8c247ce42, which removed the call to
ext4_issue_discard() to fix a BUG reported because
ext4_issue_discard() was being called from inside a block group
spinlock.  As it turns out this bug had already been fixed by Lukas
Czerner in commit 166e9c48c74d by the simple expedient of moving when
we call ext4_issue_discard() outside the spinlock.

So it should be safe to re-enable this functionality, which I tested
by putting an BUG_ON(in_atomic) just after the restored callsite to
ext4_issue_discard().

Addresses-Google-Bug: #6750518

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: Anatol Pomozov <anatol.pomozov@gmail.com>
fs/ext4/mballoc.c