mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
z3fold: fix spinlock unlocking in page reclaim
Commmit5a27aa8220("z3fold: add kref refcounting") introduced a bug in z3fold_reclaim_page() with function exit that may leave pool->lock spinlock held. Here comes the trivial fix. Fixes:5a27aa8220("z3fold: add kref refcounting") Link: http://lkml.kernel.org/r/[email protected] Reported-by: Alexey Khoroshilov <[email protected]> Signed-off-by: Vitaly Wool <[email protected]> Cc: Dan Streetman <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
69eea5a4ab
commit
271df90e4e
1 changed files with 1 additions and 0 deletions
|
|
@ -667,6 +667,7 @@ next:
|
|||
z3fold_page_unlock(zhdr);
|
||||
spin_lock(&pool->lock);
|
||||
if (kref_put(&zhdr->refcount, release_z3fold_page)) {
|
||||
spin_unlock(&pool->lock);
|
||||
atomic64_dec(&pool->pages_nr);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue