From: npiggin@suse.de
To: stable@kernel.org
Cc: linux-fsdevel@vger.kernel.org, linux-mm@vger.kernel.org
Subject: [2.6.27.stable][patch 4/6] GFS2: Fix page_mkwrite() return code
Date: Tue, 12 May 2009 16:23:50 +1000 [thread overview]
Message-ID: <20090512070750.090713470@suse.de> (raw)
In-Reply-To: 20090512062346.554974013@suse.de
[-- Attachment #1: e56985da455b9dc0591b8cb2006cc94b6f4fb0f4 --]
[-- Type: text/plain, Size: 720 bytes --]
GFS2: Fix page_mkwrite() return code
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 <swhiteho@redhat.com>
---
fs/gfs2/ops_file.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
Index: linux-2.6/fs/gfs2/ops_file.c
===================================================================
--- linux-2.6.orig/fs/gfs2/ops_file.c
+++ linux-2.6/fs/gfs2/ops_file.c
@@ -412,7 +412,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;
}
next prev parent reply other threads:[~2009-05-12 7:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-12 6:23 [2.6.27.stable][patch 0/6] page_mkwrite fixes npiggin
2009-05-12 6:23 ` [2.6.27.stable][patch 1/6] mm: page_mkwrite change prototype to match fault npiggin
2009-05-12 6:23 ` [2.6.27.stable][patch 2/6] fs: fix page_mkwrite error cases in core code and btrfs npiggin
2009-05-12 6:23 ` [2.6.27.stable][patch 3/6] mm: close page_mkwrite races npiggin
2009-05-12 6:23 ` npiggin [this message]
2009-05-12 6:23 ` [2.6.27.stable][patch 5/6] NFS: Fix the return value in nfs_page_mkwrite() npiggin
2009-05-12 6:23 ` [2.6.27.stable][patch 6/6] NFS: Close page_mkwrite() races npiggin
2009-05-12 22:07 ` [stable] [2.6.27.stable][patch 0/6] page_mkwrite fixes Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090512070750.090713470@suse.de \
--to=npiggin@suse.de \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-mm@vger.kernel.org \
--cc=stable@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.