From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx146.postini.com [74.125.245.146]) by kanga.kvack.org (Postfix) with SMTP id 46CE86B0002 for ; Tue, 16 Apr 2013 14:37:40 -0400 (EDT) Message-ID: <516D9A74.8030109@linux.intel.com> Date: Tue, 16 Apr 2013 11:37:40 -0700 From: Dave Hansen MIME-Version: 1.0 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: owner-linux-mm@kvack.org List-ID: To: zhang.yi20@zte.com.cn Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, Peter Zijlstra , Darren Hart , Thomas Gleixner , Ingo Molnar 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, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org