Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

ext4: remove duplicate call to ext4_bread() in ext4_init_new_dir()

This fixes a buffer cache leak when creating a directory, introduced
in commit a774f9c.

Signed-off-by: Guo Chao <yan@linux.vnet.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Reviewed-by: Tao Ma <boyu.mt@taobao.com>
  • Loading branch information...
commit fef0ebdb229bedce888b63923e2a1ba4e6c6a84c 1 parent 0ecaef0
Guo Chao authored tytso committed
Showing with 0 additions and 1 deletion.
  1. +0 −1  fs/ext4/namei.c
View
1  fs/ext4/namei.c
@@ -2368,7 +2368,6 @@ static int ext4_init_new_dir(handle_t *handle, struct inode *dir,
}
inode->i_size = EXT4_I(inode)->i_disksize = blocksize;
- dir_block = ext4_bread(handle, inode, 0, 1, &err);
if (!(dir_block = ext4_bread(handle, inode, 0, 1, &err))) {
if (!err) {
err = -EIO;
Please sign in to comment.
Something went wrong with that request. Please try again.