summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2009-04-20 09:45:54 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2009-05-18 16:35:05 -0700
commite3fedc3d38a8b6a513f34e30ebc4d685c49261c9 (patch)
tree930b4f9499ed050155e155a1280615ace93f1009
parente58fcb489af71008f265f9b9b8af34ca123a8fc7 (diff)
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 <swhiteho@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--fs/gfs2/ops_file.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/gfs2/ops_file.c b/fs/gfs2/ops_file.c
index ed785c1cb136..0093a3342642 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;
}