From: Steven Whitehouse Date: Mon, 20 Apr 2009 08:45:54 +0000 (+0100) Subject: GFS2: Fix page_mkwrite() return code X-Git-Tag: v2.6.29.4~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e3fedc3d38a8b6a513f34e30ebc4d685c49261c9;p=thirdparty%2Fkernel%2Fstable.git GFS2: Fix page_mkwrite() return code 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 --- diff --git a/fs/gfs2/ops_file.c b/fs/gfs2/ops_file.c index ed785c1cb1367..0093a33426427 100644 --- 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; }