Skip to content

Commit

Permalink
ext4: return ENOMEM if find_or_create_pages fails
Browse files Browse the repository at this point in the history
Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
  • Loading branch information
Yongqiang Yang authored and Theodore Ts'o committed Oct 31, 2011
1 parent e260daf commit 5129d05
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/ext4/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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));
Expand Down

0 comments on commit 5129d05

Please sign in to comment.