From: Joseph Qi Date: Tue, 5 Nov 2013 05:55:01 +0000 (+1100) Subject: ocfs2-return-enomem-when-sb_getblk-fails-update X-Git-Tag: next-20131105~2^2~312 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=8bf2098526901c9991d22d6b8b5ad713b9b6d09d;p=karo-tx-linux.git ocfs2-return-enomem-when-sb_getblk-fails-update ocfs2_symlink_get_block in aops.c, and ocfs2_read_blocks_sync and ocfs2_read_blocks in buffer_head_io.c need do the same change for consistency. Cc: Rui Xiang Cc: Jie Liu Cc: Mark Fasheh Cc: Joel Becker Signed-off-by: Andrew Morton --- diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c index 80963f593539..c20360002f29 100644 --- a/fs/ocfs2/aops.c +++ b/fs/ocfs2/aops.c @@ -93,6 +93,7 @@ static int ocfs2_symlink_get_block(struct inode *inode, sector_t iblock, iblock; buffer_cache_bh = sb_getblk(osb->sb, blkno); if (!buffer_cache_bh) { + err = -ENOMEM; mlog(ML_ERROR, "couldn't getblock for symlink!\n"); goto bail; } diff --git a/fs/ocfs2/buffer_head_io.c b/fs/ocfs2/buffer_head_io.c index 5d18ad10c27f..5b704c63a103 100644 --- a/fs/ocfs2/buffer_head_io.c +++ b/fs/ocfs2/buffer_head_io.c @@ -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; }