ocfs2: Fix ocfs2_page_mkwrite()
authorWengang Wang <wen.gang.wang@oracle.com>
Sun, 24 Jul 2011 17:36:54 +0000 (10:36 -0700)
committerSunil Mushran <sunil.mushran@oracle.com>
Sun, 24 Jul 2011 17:36:54 +0000 (10:36 -0700)
commit5cffff9e29866a3de98c2c25135b3199491f93b0
tree11b53cb3ad7cb44adb80f7802a62c145bf713514
parenta035bff6b82aca89c1223e2c614adc2d17ec8aa2
ocfs2: Fix ocfs2_page_mkwrite()

This patch address two shortcomings in ocfs2_page_mkwrite():
1. Makes the function return better VM_FAULT_* errors.
2. It handles a error that is triggered when a page is dropped from the mapping
due to memory pressure. This patch locks the page to prevent that.

[Patch was cleaned up by Sunil Mushran.]

Signed-off-by: Wengang Wang <wen.gang.wang@oracle.com>
Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
fs/ocfs2/aops.c
fs/ocfs2/mmap.c