diff options
author | Vitaly Wool <[email protected]> | 2017-03-16 16:40:19 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2017-03-16 16:56:18 -0700 |
commit | 271df90e4e530c17f237b27034d6341cb2c2f536 (patch) | |
tree | 37c4d5e3ee0e029749d65aca37981dbe1ae93279 | |
parent | 69eea5a4ab9c705496e912b55a9d312325de19e6 (diff) |
z3fold: fix spinlock unlocking in page reclaim
Commmit 5a27aa822029 ("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: 5a27aa822029 ("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]>
-rw-r--r-- | mm/z3fold.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/mm/z3fold.c b/mm/z3fold.c index 8970a2fd3b1a..f9492bccfd79 100644 --- a/mm/z3fold.c +++ b/mm/z3fold.c @@ -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; } |