提交 6976a6f2 编写于 作者: A Allison Henderson 提交者: Theodore Ts'o

ext4: don't dereference null pointer when make_indexed_dir() fails

Fix for a null pointer bug found while running punch hole tests
Signed-off-by: NAllison Henderson <achender@us.ibm.com>
Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
上级 44183d42
......@@ -1413,6 +1413,10 @@ static int make_indexed_dir(handle_t *handle, struct dentry *dentry,
frame->at = entries;
frame->bh = bh;
bh = bh2;
ext4_handle_dirty_metadata(handle, dir, frame->bh);
ext4_handle_dirty_metadata(handle, dir, bh);
de = do_split(handle,dir, &bh, frame, &hinfo, &retval);
if (!de) {
/*
......@@ -1421,8 +1425,6 @@ static int make_indexed_dir(handle_t *handle, struct dentry *dentry,
* with corrupted filesystem.
*/
ext4_mark_inode_dirty(handle, dir);
ext4_handle_dirty_metadata(handle, dir, frame->bh);
ext4_handle_dirty_metadata(handle, dir, bh);
dx_release(frames);
return retval;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册