summaryrefslogtreecommitdiffstats
path: root/fs/ext4/inode.c
diff options
context:
space:
mode:
authorYongqiang Yang <xiaoqiangnk@gmail.com>2011-10-31 17:56:10 -0400
committerTheodore Ts'o <tytso@mit.edu>2011-10-31 17:56:10 -0400
commit5129d05fda57be13f434dbe8536de39a6c25496d (patch)
treee02d95dc0bba3fb12c69489c30b43fecca9fb115 /fs/ext4/inode.c
parente260daf27902b2189a9198f5b64fa4567939bb5b (diff)
downloadlinux-5129d05fda57be13f434dbe8536de39a6c25496d.tar.gz
linux-5129d05fda57be13f434dbe8536de39a6c25496d.tar.bz2
linux-5129d05fda57be13f434dbe8536de39a6c25496d.zip
ext4: return ENOMEM if find_or_create_pages fails
Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/inode.c')
-rw-r--r--fs/ext4/inode.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index f60b459b27d7..5fcef98f98e5 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -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));