summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2017-02-08 10:27:25 +1100
committerStephen Rothwell <sfr@canb.auug.org.au>2017-02-09 21:53:03 +1100
commitb25433a1a7b6c63da926d20c60e9346084c4debc (patch)
treef284fbf1928e610fdf860ccd3594792594d16fa6
parent1a482d2911f4fd06698b8eaec6e3ba40c523ec94 (diff)
z3fold-add-kref-refcounting-checkpatch-fixes
WARNING: Missing a blank line after declarations #93: FILE: mm/z3fold.c:172: + struct page *page = virt_to_page(zhdr); + if (!list_empty(&zhdr->buddy)) total: 0 errors, 1 warnings, 261 lines checked NOTE: For some of the reported defects, checkpatch may be able to mechanically convert to the typical style using --fix or --fix-inplace. ./patches/z3fold-add-kref-refcounting.patch has style problems, please review. NOTE: If any of the errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS. Please run checkpatch prior to sending patches Cc: Vitaly Wool <vitalywool@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-rw-r--r--mm/z3fold.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/mm/z3fold.c b/mm/z3fold.c
index bcbcf4736bf9..8970a2fd3b1a 100644
--- a/mm/z3fold.c
+++ b/mm/z3fold.c
@@ -166,9 +166,12 @@ static void free_z3fold_page(struct page *page)
static void release_z3fold_page(struct kref *ref)
{
- struct z3fold_header *zhdr = container_of(ref, struct z3fold_header,
- refcount);
- struct page *page = virt_to_page(zhdr);
+ struct z3fold_header *zhdr;
+ struct page *page;
+
+ zhdr = container_of(ref, struct z3fold_header, refcount);
+ page = virt_to_page(zhdr);
+
if (!list_empty(&zhdr->buddy))
list_del(&zhdr->buddy);
if (!list_empty(&page->lru))
@@ -188,7 +191,6 @@ static inline void z3fold_page_unlock(struct z3fold_header *zhdr)
spin_unlock(&zhdr->page_lock);
}
-
/*
* Encodes the handle of a particular buddy within a z3fold page
* Pool lock should be held as this function accesses first_num