mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-04 18:19:28 +09:00
bcache: Fix a dumb journal discard bug
commit 6d9d21e35f upstream.
That switch statement was obviously wrong, leading to some sort of weird
spinning on rare occasion with discards enabled...
Signed-off-by: Kent Overstreet <kmo@daterainc.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
d8a1cf0bdb
commit
0a22f485ee
@@ -425,7 +425,7 @@ static void do_journal_discard(struct cache *ca)
|
||||
return;
|
||||
}
|
||||
|
||||
switch (atomic_read(&ja->discard_in_flight) == DISCARD_IN_FLIGHT) {
|
||||
switch (atomic_read(&ja->discard_in_flight)) {
|
||||
case DISCARD_IN_FLIGHT:
|
||||
return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user