Skip to content

Commit

Permalink
ext4: check ext4_journal_get_write_access() errors
Browse files Browse the repository at this point in the history
Check ext4_journal_get_write_access() errors.

Signed-off-by: Akinobu Mita <[email protected]>
Signed-off-by: "Theodore Ts'o" <[email protected]>
Cc: Stephen Tweedie <[email protected]>
Cc: [email protected]
Cc: Andrew Morton <[email protected]>
Cc: Mingming Cao <[email protected]>
  • Loading branch information
mita authored and tytso committed Apr 17, 2008
1 parent c0a4ef3 commit a871611
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions fs/ext4/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,15 @@ static struct buffer_head *ext4_append(handle_t *handle,

*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;
}
Expand Down

0 comments on commit a871611

Please sign in to comment.