Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932652Ab0KRR3Z (ORCPT ); Thu, 18 Nov 2010 12:29:25 -0500 Received: from smtp1.linux-foundation.org ([140.211.169.13]:48392 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755182Ab0KRR3Y convert rfc822-to-8bit (ORCPT ); Thu, 18 Nov 2010 12:29:24 -0500 MIME-Version: 1.0 In-Reply-To: <20101118114902.GJ8135@csn.ul.ie> References: <20101118114902.GJ8135@csn.ul.ie> From: Linus Torvalds Date: Thu, 18 Nov 2010 09:28:27 -0800 Message-ID: Subject: Re: [PATCH 05 of 66] compound_lock To: Mel Gorman Cc: Andrea Arcangeli , linux-mm@kvack.org, Andrew Morton , linux-kernel@vger.kernel.org, Marcelo Tosatti , Adam Litke , Avi Kivity , Hugh Dickins , Rik van Riel , Dave Hansen , Benjamin Herrenschmidt , Ingo Molnar , Mike Travis , KAMEZAWA Hiroyuki , Christoph Lameter , Chris Wright , bpicco@redhat.com, KOSAKI Motohiro , Balbir Singh , "Michael S. Tsirkin" , Peter Zijlstra , Johannes Weiner , Daisuke Nishimura , Chris Mason , Borislav Petkov Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 871 Lines: 26 On Thu, Nov 18, 2010 at 3:49 AM, Mel Gorman wrote: >> + >> +static inline void compound_lock_irqsave(struct page *page, >> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?unsigned long *flagsp) >> +{ >> +#ifdef CONFIG_TRANSPARENT_HUGEPAGE >> + ? ? unsigned long flags; >> + ? ? local_irq_save(flags); >> + ? ? compound_lock(page); >> + ? ? *flagsp = flags; >> +#endif >> +} >> + > > The pattern for spinlock irqsave passes in unsigned long, not unsigned > long *. It'd be nice if they matched. Indeed. Just make the thing return the flags the way the normal spin_lock_irqsave() function does. Linus -- 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/