ocfs2: return ENOMEM when sb_getblk() fails
The only reason for sb_getblk() failing is if it can't allocate the buffer_head. So return ENOMEM instead when it fails. [joseph.qi@huawei.com: ocfs2_symlink_get_block() and ocfs2_read_blocks_sync() and ocfs2_read_blocks() need the same change] Signed-off-by: Rui Xiang <rui.xiang@huawei.com> Reviewed-by: Jie Liu <jeff.liu@oracle.com> Reviewed-by: Mark Fasheh <mfasheh@suse.de> Cc: Joel Becker <jlbec@evilplan.org> Cc: Joseph Qi <joseph.qi@huawei.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
このコミットが含まれているのは:
@@ -1848,8 +1848,8 @@ static int ocfs2_get_sector(struct super_block *sb,
|
||||
|
||||
*bh = sb_getblk(sb, block);
|
||||
if (!*bh) {
|
||||
mlog_errno(-EIO);
|
||||
return -EIO;
|
||||
mlog_errno(-ENOMEM);
|
||||
return -ENOMEM;
|
||||
}
|
||||
lock_buffer(*bh);
|
||||
if (!buffer_dirty(*bh))
|
||||
|
新しいイシューから参照
ユーザーをブロックする