Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751553AbbGINyu (ORCPT ); Thu, 9 Jul 2015 09:54:50 -0400 Received: from blu004-omc3s33.hotmail.com ([65.55.116.108]:59943 "EHLO BLU004-OMC3S33.hotmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751093AbbGINyl (ORCPT ); Thu, 9 Jul 2015 09:54:41 -0400 X-Greylist: delayed 300 seconds by postgrey-1.27 at vger.kernel.org; Thu, 09 Jul 2015 09:54:41 EDT X-TMN: [h9W4lPxlcxBuM0xGUxSJppjeiKoZE6ISj4IXTiqAn0s=] X-Originating-Email: [incarnation.p.lee@outlook.com] Message-ID: From: "Incarnation P. Lee" To: oleg.drokin@inte.com, andreas.dilger@intel.com, gregkh@linuxfoundation.org CC: Julia.Lawall@lip6.fr, HPDD-discuss@ml01.01.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, "Incarnation P. Lee" Subject: [PATCH] Fix script/checkpatch.pl coding style issus. Date: Thu, 9 Jul 2015 00:57:56 +0800 X-Mailer: git-send-email 1.9.0 X-OriginalArrivalTime: 09 Jul 2015 13:49:40.0150 (UTC) FILETIME=[1A145560:01D0BA4E] MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2521 Lines: 73 --- drivers/staging/lustre/lustre/obdclass/cl_page.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/drivers/staging/lustre/lustre/obdclass/cl_page.c b/drivers/staging/lustre/lustre/obdclass/cl_page.c index a7f3032..428c6b2 100644 --- a/drivers/staging/lustre/lustre/obdclass/cl_page.c +++ b/drivers/staging/lustre/lustre/obdclass/cl_page.c @@ -51,13 +51,13 @@ static void cl_page_delete0(const struct lu_env *env, struct cl_page *pg, int radix); -# define PASSERT(env, page, expr) \ - do { \ - if (unlikely(!(expr))) { \ - CL_PAGE_DEBUG(D_ERROR, (env), (page), #expr "\n"); \ - LASSERT(0); \ - } \ - } while (0) +# define PASSERT(env, page, expr) \ + do { \ + if (unlikely(!(expr))) { \ + CL_PAGE_DEBUG(D_ERROR, (env), (page), #expr "\n"); \ + LASSERT(0); \ + } \ + } while (0) # define PINVRNT(env, page, exp) \ ((void)sizeof(env), (void)sizeof(page), (void)sizeof !!(exp)) @@ -169,6 +169,7 @@ int cl_page_gang_lookup(const struct lu_env *env, struct cl_object *obj, while ((nr = radix_tree_gang_lookup(&hdr->coh_tree, (void **)pvec, idx, CLT_PVEC_SIZE)) > 0) { int end_of_region = 0; + idx = pvec[nr - 1]->cp_index + 1; for (i = 0, j = 0; i < nr; ++i) { page = pvec[i]; @@ -286,6 +287,7 @@ static struct cl_page *cl_page_alloc(const struct lu_env *env, GFP_NOFS); if (page != NULL) { int result = 0; + atomic_set(&page->cp_ref, 1); if (type == CPT_CACHEABLE) /* for radix tree */ atomic_inc(&page->cp_ref); @@ -372,9 +374,8 @@ static struct cl_page *cl_page_find0(const struct lu_env *env, idx) == page)); } - if (page != NULL) { + if (page != NULL) return page; - } /* allocate and initialize cl_page */ page = cl_page_alloc(env, o, idx, vmpage, type); @@ -1425,7 +1426,7 @@ void cl_page_clip(const struct lu_env *env, struct cl_page *pg, CL_PAGE_HEADER(D_TRACE, env, pg, "%d %d\n", from, to); CL_PAGE_INVOID(env, pg, CL_PAGE_OP(cpo_clip), (const struct lu_env *, - const struct cl_page_slice *,int, int), + const struct cl_page_slice *, int, int), from, to); } EXPORT_SYMBOL(cl_page_clip); -- 1.9.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/