提交 5129d05f 编写于 作者: Y Yongqiang Yang 提交者: Theodore Ts'o

ext4: return ENOMEM if find_or_create_pages fails

Signed-off-by: NYongqiang Yang <xiaoqiangnk@gmail.com>
Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
上级 e260daf2
......@@ -3129,7 +3129,7 @@ int ext4_discard_partial_page_buffers(handle_t *handle,
page = find_or_create_page(mapping, from >> PAGE_CACHE_SHIFT,
mapping_gfp_mask(mapping) & ~__GFP_FS);
if (!page)
return -EINVAL;
return -ENOMEM;
err = ext4_discard_partial_page_buffers_no_lock(handle, inode, page,
from, length, flags);
......@@ -3372,7 +3372,7 @@ int ext4_block_zero_page_range(handle_t *handle,
page = find_or_create_page(mapping, from >> PAGE_CACHE_SHIFT,
mapping_gfp_mask(mapping) & ~__GFP_FS);
if (!page)
return -EINVAL;
return -ENOMEM;
blocksize = inode->i_sb->s_blocksize;
max = blocksize - (offset & (blocksize - 1));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册