From: Yongqiang Yang <xiaoqiangnk@gmail.com>
To: tytso@mit.edu
Cc: linux-ext4@vger.kernel.org, Yongqiang Yang <xiaoqiangnk@gmail.com>
Subject: [PATCH 2/3] ext4: return ENOMEM if find_or_create_pages fails
Date: Sun, 30 Oct 2011 19:30:02 +0800 [thread overview]
Message-ID: <1319974203-2625-2-git-send-email-xiaoqiangnk@gmail.com> (raw)
In-Reply-To: <1319974203-2625-1-git-send-email-xiaoqiangnk@gmail.com>
Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com>
---
fs/ext4/inode.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 3c4a9d5..e113de8 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -3132,7 +3132,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);
@@ -3375,7 +3375,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));
--
1.7.5.1
next prev parent reply other threads:[~2011-10-30 13:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-30 11:30 [PATCH 1/3] ext4: move variables to its scope Yongqiang Yang
2011-10-30 11:30 ` Yongqiang Yang [this message]
2011-10-31 22:12 ` [PATCH 2/3] ext4: return ENOMEM if find_or_create_pages fails Ted Ts'o
2011-10-30 11:30 ` [PATCH 3/3] ext4: let ext4_discard_partial_buffers handle unaligned range correctly Yongqiang Yang
2011-10-30 13:36 ` Yongqiang Yang
2011-10-31 22:12 ` Ted Ts'o
2011-10-30 14:00 ` [PATCH 1/3] ext4: move variables to its scope Coly Li
2011-10-31 22:12 ` Ted Ts'o
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1319974203-2625-2-git-send-email-xiaoqiangnk@gmail.com \
--to=xiaoqiangnk@gmail.com \
--cc=linux-ext4@vger.kernel.org \
--cc=tytso@mit.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).