Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965114Ab3DPShl (ORCPT ); Tue, 16 Apr 2013 14:37:41 -0400 Received: from mga09.intel.com ([134.134.136.24]:1362 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934781Ab3DPShk (ORCPT ); Tue, 16 Apr 2013 14:37:40 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.87,487,1363158000"; d="scan'208";a="295823112" Message-ID: <516D9A74.8030109@linux.intel.com> Date: Tue, 16 Apr 2013 11:37:40 -0700 From: Dave Hansen User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130329 Thunderbird/17.0.5 MIME-Version: 1.0 To: zhang.yi20@zte.com.cn CC: linux-kernel@vger.kernel.org, linux-mm@kvack.org, Peter Zijlstra , Darren Hart , Thomas Gleixner , Ingo Molnar Subject: Re: [PATCH] futex: bugfix for futex-key conflict when futex use hugepage References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 640 Lines: 17 Instead of bothering to store the index, why not just calculate it, like: On 04/15/2013 08:37 PM, zhang.yi20@zte.com.cn wrote: > +static inline int get_page_compound_index(struct page *page) > +{ > + if (PageHead(page)) > + return 0; > + return compound_head(page) - page; > +} BTW, you've really got to get your mail client fixed. Your patch is still line-wrapped. -- 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/