projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e0e369a
)
ext3: check ext3_journal_get_write_access() errors
author
Akinobu Mita
<
[email protected]
>
Mon, 28 Apr 2008 09:16:08 +0000
(
02:16
-0700)
committer
Linus Torvalds
<
[email protected]
>
Mon, 28 Apr 2008 15:58:44 +0000
(08:58 -0700)
Check ext3_journal_get_write_access() errors.
Signed-off-by: Akinobu Mita <
[email protected]
>
Cc: <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
fs/ext3/namei.c
patch
|
blob
|
history
diff --git
a/fs/ext3/namei.c
b/fs/ext3/namei.c
index dec3e0d88ab1536745ccf52c70a23a2a6a04ca57..ba55865caaafc1ab6032db457cf73c0e73946547 100644
(file)
--- a/
fs/ext3/namei.c
+++ b/
fs/ext3/namei.c
@@
-57,10
+57,15
@@
static struct buffer_head *ext3_append(handle_t *handle,
*block = inode->i_size >> inode->i_sb->s_blocksize_bits;
- if ((bh = ext3_bread(handle, inode, *block, 1, err))) {
+ bh = ext3_bread(handle, inode, *block, 1, err);
+ if (bh) {
inode->i_size += inode->i_sb->s_blocksize;
EXT3_I(inode)->i_disksize = inode->i_size;
- ext3_journal_get_write_access(handle,bh);
+ *err = ext3_journal_get_write_access(handle, bh);
+ if (*err) {
+ brelse(bh);
+ bh = NULL;
+ }
}
return bh;
}