diff options
author | Namhyung Kim <namhyung@gmail.com> | 2010-11-19 16:28:35 +0900 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2011-01-06 11:52:15 +0100 |
commit | fbcae8e32d73ad6cad9c5721881350c51174d552 (patch) | |
tree | 74a93039355a09ef629abac1536ae9275c55d506 /fs/ext3 | |
parent | 2b543edae2d9161ae8dda1d85cbd28ef8a166cc0 (diff) | |
download | kernel_goldelico_gta04-fbcae8e32d73ad6cad9c5721881350c51174d552.zip kernel_goldelico_gta04-fbcae8e32d73ad6cad9c5721881350c51174d552.tar.gz kernel_goldelico_gta04-fbcae8e32d73ad6cad9c5721881350c51174d552.tar.bz2 |
ext3: Add journal error check into ext3_delete_entry()
Check return value of ext3_journal_get_write_access() and
ext3_journal_dirty_metadata().
Signed-off-by: Namhyung Kim <namhyung@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/ext3')
-rw-r--r-- | fs/ext3/namei.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/fs/ext3/namei.c b/fs/ext3/namei.c index 03fccc5..672cea1 100644 --- a/fs/ext3/namei.c +++ b/fs/ext3/namei.c @@ -1644,8 +1644,13 @@ static int ext3_delete_entry (handle_t *handle, if (!ext3_check_dir_entry("ext3_delete_entry", dir, de, bh, i)) return -EIO; if (de == de_del) { + int err; + BUFFER_TRACE(bh, "get_write_access"); - ext3_journal_get_write_access(handle, bh); + err = ext3_journal_get_write_access(handle, bh); + if (err) + goto journal_error; + if (pde) pde->rec_len = ext3_rec_len_to_disk( ext3_rec_len_from_disk(pde->rec_len) + @@ -1654,7 +1659,12 @@ static int ext3_delete_entry (handle_t *handle, de->inode = 0; dir->i_version++; BUFFER_TRACE(bh, "call ext3_journal_dirty_metadata"); - ext3_journal_dirty_metadata(handle, bh); + err = ext3_journal_dirty_metadata(handle, bh); + if (err) { +journal_error: + ext3_std_error(dir->i_sb, err); + return err; + } return 0; } i += ext3_rec_len_from_disk(de->rec_len); |