From: Mingming Cao <cmm@us.ibm.com>
To: linux-ext4@vger.kernel.org
Subject: [PATCH]fix delalloc write_begin failure case
Date: Fri, 09 May 2008 16:45:25 -0700 [thread overview]
Message-ID: <1210376725.3639.66.camel@localhost.localdomain> (raw)
Need to unlock and release the page from page cache if the delalloc
write_begin failed.
Signed-off-by: Mingming Cao <cmm@us.ibm.com>
---
fs/ext4/inode.c | 5 +++++
1 file changed, 5 insertions(+)
Index: linux-2.6.26-rc1/fs/ext4/inode.c
===================================================================
--- linux-2.6.26-rc1.orig/fs/ext4/inode.c 2008-05-09 16:21:49.000000000 -0700
+++ linux-2.6.26-rc1/fs/ext4/inode.c 2008-05-09 16:25:26.000000000 -0700
@@ -1518,6 +1518,11 @@ static int ext4_da_write_begin(struct fi
ret = block_write_begin(file, mapping, pos, len, flags, pagep, fsdata,
ext4_da_get_block_prep);
+ if (ret < 0) {
+ unlock_page(page);
+ page_cache_release(page);
+ }
+
return ret;
}
reply other threads:[~2008-05-09 23:45 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1210376725.3639.66.camel@localhost.localdomain \
--to=cmm@us.ibm.com \
--cc=linux-ext4@vger.kernel.org \
/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