From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761376AbZENWwk (ORCPT ); Thu, 14 May 2009 18:52:40 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756900AbZENWmm (ORCPT ); Thu, 14 May 2009 18:42:42 -0400 Received: from kroah.org ([198.145.64.141]:52512 "EHLO coco.kroah.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756654AbZENWmY (ORCPT ); Thu, 14 May 2009 18:42:24 -0400 X-Mailbox-Line: From gregkh@mini.kroah.org Thu May 14 15:35:25 2009 Message-Id: <20090514223525.725788032@mini.kroah.org> User-Agent: quilt/0.48-1 Date: Thu, 14 May 2009 15:33:08 -0700 From: Greg KH To: linux-kernel@vger.kernel.org, stable@kernel.org Cc: Justin Forbes , Zwane Mwaikambo , "Theodore Ts'o" , Randy Dunlap , Dave Jones , Chuck Wolber , Chris Wedgwood , Michael Krufky , Chuck Ebbert , Domenico Andreoli , Willy Tarreau , Rodrigo Rubira Branco , Jake Edge , Eugene Teo , torvalds@linux-foundation.org, akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk, Steven Whitehouse Subject: [patch 33/51] GFS2: Fix page_mkwrite() return code References: <20090514223235.348540705@mini.kroah.org> Content-Disposition: inline; filename=gfs2-fix-page_mkwrite-return-code.patch In-Reply-To: <20090514223755.GA27019@kroah.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2.6.29-stable review patch. If anyone has any objections, please let us know. ------------------ From: Steven Whitehouse commit e56985da455b9dc0591b8cb2006cc94b6f4fb0f4 upstream. This allows for the possibility of returning VM_FAULT_OOM as well as VM_FAULT_SIGBUS. This ensures that the correct action is taken. Signed-off-by: Steven Whitehouse Signed-off-by: Greg Kroah-Hartman --- fs/gfs2/ops_file.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/fs/gfs2/ops_file.c +++ b/fs/gfs2/ops_file.c @@ -410,7 +410,9 @@ out_unlock: gfs2_glock_dq(&gh); out: gfs2_holder_uninit(&gh); - if (ret) + if (ret == -ENOMEM) + ret = VM_FAULT_OOM; + else if (ret) ret = VM_FAULT_SIGBUS; return ret; }