ocfs2: return ENOMEM when sb_getblk() fails
[linux-2.6-block.git] / fs / ocfs2 / buffer_head_io.c
index 5d18ad10c27fc044ae240a5c147c8f3e0b146ae5..5b704c63a103018ddb8a56663e42edd09d6d40ff 100644 (file)
@@ -115,7 +115,7 @@ int ocfs2_read_blocks_sync(struct ocfs2_super *osb, u64 block,
                if (bhs[i] == NULL) {
                        bhs[i] = sb_getblk(osb->sb, block++);
                        if (bhs[i] == NULL) {
-                               status = -EIO;
+                               status = -ENOMEM;
                                mlog_errno(status);
                                goto bail;
                        }
@@ -214,7 +214,7 @@ int ocfs2_read_blocks(struct ocfs2_caching_info *ci, u64 block, int nr,
                        bhs[i] = sb_getblk(sb, block++);
                        if (bhs[i] == NULL) {
                                ocfs2_metadata_cache_io_unlock(ci);
-                               status = -EIO;
+                               status = -ENOMEM;
                                mlog_errno(status);
                                goto bail;
                        }