* [PATCH 4/4] ext4: check ext4_journal_get_write_access() errors
@ 2008-02-17 6:15 Akinobu Mita
2008-02-19 8:19 ` Mingming Cao
0 siblings, 1 reply; 2+ messages in thread
From: Akinobu Mita @ 2008-02-17 6:15 UTC (permalink / raw)
To: linux-ext4
Cc: Andrew Morton, Stephen Tweedie, adilger, Mingming Cao,
Theodore Tso
Check ext4_journal_get_write_access() errors.
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Stephen Tweedie <sct@redhat.com>
Cc: adilger@clusterfs.com
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Mingming Cao <cmm@us.ibm.com>
Cc: Theodore Tso <tytso@MIT.EDU>
---
fs/ext4/namei.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
Index: 2.6-rc/fs/ext4/namei.c
===================================================================
--- 2.6-rc.orig/fs/ext4/namei.c
+++ 2.6-rc/fs/ext4/namei.c
@@ -57,10 +57,15 @@ static struct buffer_head *ext4_append(h
*block = inode->i_size >> inode->i_sb->s_blocksize_bits;
- if ((bh = ext4_bread(handle, inode, *block, 1, err))) {
+ bh = ext4_bread(handle, inode, *block, 1, err);
+ if (bh) {
inode->i_size += inode->i_sb->s_blocksize;
EXT4_I(inode)->i_disksize = inode->i_size;
- ext4_journal_get_write_access(handle,bh);
+ *err = ext4_journal_get_write_access(handle, bh);
+ if (*err) {
+ brelse(bh);
+ bh = NULL;
+ }
}
return bh;
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH 4/4] ext4: check ext4_journal_get_write_access() errors
2008-02-17 6:15 [PATCH 4/4] ext4: check ext4_journal_get_write_access() errors Akinobu Mita
@ 2008-02-19 8:19 ` Mingming Cao
0 siblings, 0 replies; 2+ messages in thread
From: Mingming Cao @ 2008-02-19 8:19 UTC (permalink / raw)
To: Akinobu Mita
Cc: linux-ext4, Andrew Morton, Stephen Tweedie, adilger, Theodore Tso
On Sun, 2008-02-17 at 15:15 +0900, Akinobu Mita wrote:
> Check ext4_journal_get_write_access() errors.
>
Acked and added to ext4 patch queue
Mingming
> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
> Cc: Stephen Tweedie <sct@redhat.com>
> Cc: adilger@clusterfs.com
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Mingming Cao <cmm@us.ibm.com>
> Cc: Theodore Tso <tytso@MIT.EDU>
> ---
> fs/ext4/namei.c | 9 +++++++--
> 1 file changed, 7 insertions(+), 2 deletions(-)
>
> Index: 2.6-rc/fs/ext4/namei.c
> ===================================================================
> --- 2.6-rc.orig/fs/ext4/namei.c
> +++ 2.6-rc/fs/ext4/namei.c
> @@ -57,10 +57,15 @@ static struct buffer_head *ext4_append(h
>
> *block = inode->i_size >> inode->i_sb->s_blocksize_bits;
>
> - if ((bh = ext4_bread(handle, inode, *block, 1, err))) {
> + bh = ext4_bread(handle, inode, *block, 1, err);
> + if (bh) {
> inode->i_size += inode->i_sb->s_blocksize;
> EXT4_I(inode)->i_disksize = inode->i_size;
> - ext4_journal_get_write_access(handle,bh);
> + *err = ext4_journal_get_write_access(handle, bh);
> + if (*err) {
> + brelse(bh);
> + bh = NULL;
> + }
> }
> return bh;
> }
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-02-19 8:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-17 6:15 [PATCH 4/4] ext4: check ext4_journal_get_write_access() errors Akinobu Mita
2008-02-19 8:19 ` Mingming Cao
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).