[Ocfs2-commits] mfasheh commits r2183 - trunk/fs/ocfs2
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Tue Apr 26 19:41:36 CDT 2005
Author: mfasheh
Signed-off-by: jlbec
Date: 2005-04-26 19:41:34 -0500 (Tue, 26 Apr 2005)
New Revision: 2183
Modified:
trunk/fs/ocfs2/mmap.c
Log:
* Use proper error returns from ocfs2_nopage.
Signed-off-by: jlbec
Modified: trunk/fs/ocfs2/mmap.c
===================================================================
--- trunk/fs/ocfs2/mmap.c 2005-04-26 22:36:18 UTC (rev 2182)
+++ trunk/fs/ocfs2/mmap.c 2005-04-27 00:41:34 UTC (rev 2183)
@@ -70,7 +70,7 @@
int status;
int locked;
struct inode *inode = area->vm_file->f_dentry->d_inode;
- struct page *page = NULL;
+ struct page *page;
DECLARE_IO_MARKER(io_marker);
mlog_entry("(inode %lu, address %lu)\n", inode->i_ino,
@@ -79,17 +79,28 @@
locked = ocfs2_is_in_io_marker_list(inode, current);
if (!locked) {
+ /* For lack of a better error... Unfortunately returns
+ * from nopage aren't very expressive right now. */
+ page = NOPAGE_SIGBUS;
+
/* Since we don't allow shared writable, we need only
* worry about read locking here. */
status = ocfs2_meta_lock(inode, NULL, NULL, 0);
if (status < 0) {
mlog_errno(status);
+
+ if (status == -ENOMEM)
+ page = NOPAGE_OOM;
goto bail;
}
status = ocfs2_data_lock(inode, 0);
if (status < 0) {
mlog_errno(status);
+
+ if (status == -ENOMEM)
+ page = NOPAGE_OOM;
+
ocfs2_meta_unlock(inode, 0);
goto bail;
}
More information about the Ocfs2-commits
mailing list