From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755849Ab1CWOfe (ORCPT ); Wed, 23 Mar 2011 10:35:34 -0400 Received: from smtp1.linux-foundation.org ([140.211.169.13]:58126 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751109Ab1CWOfd (ORCPT ); Wed, 23 Mar 2011 10:35:33 -0400 MIME-Version: 1.0 In-Reply-To: <20110323171051.1ADA.A69D9226@jp.fujitsu.com> References: <20110322200945.B06D.A69D9226@jp.fujitsu.com> <20110323164949.5be6aa48.kamezawa.hiroyu@jp.fujitsu.com> <20110323171051.1ADA.A69D9226@jp.fujitsu.com> From: Linus Torvalds Date: Wed, 23 Mar 2011 07:34:43 -0700 Message-ID: Subject: Re: [PATCH 5/5] x86,mm: make pagefault killable To: KOSAKI Motohiro Cc: KAMEZAWA Hiroyuki , linux-kernel@vger.kernel.org, Andrew Morton , David Rientjes , Rik van Riel , Oleg Nesterov , linux-mm , Andrey Vagin , Hugh Dickins Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 23, 2011 at 1:09 AM, KOSAKI Motohiro wrote: > > When __lock_page_or_retry() return 0, It call up_read(mmap_sem) in this > function. Indeed. > I agree this is strange (or ugly). but I don't want change this spec in > this time. I agree that it is strange, and I don't like functions that touch locks that they didn't take themselves, but since the original point of the whole thing was to wait for the page without holding the mmap_sem lock, that function has to do the up_read() early. Linus