z3fold: fix spinlock unlocking in page reclaim
[email protected]
maintainerPATCH 1/6 z3fold: fix spinlock unlocking in page reclaim
From: Vitaly Wool <[email protected]>
Subject: z3fold: fix spinlock unlocking in page reclaim
5a27aa8220290b64 ("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 5a27aa8220290b ("z3fold: add kref refcounting")
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]>
---
mm/z3fold.c | 1 + 1 file changed, 1 insertion(+)
mm/z3fold.c renamed from mm/z3fold.c~z3fold-fix-spinlock-unlocking-in-page-reclaim +1 -0
@@ -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 ; }
_