summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorGuo Chao <yan@linux.vnet.ibm.com>2013-01-06 23:40:25 -0500
committerTheodore Ts'o <tytso@mit.edu>2013-01-06 23:40:25 -0500
commitfef0ebdb229bedce888b63923e2a1ba4e6c6a84c (patch)
treebff420c9a7e6b614a1ed83f22157475b885b421c /fs
parent0ecaef0644973e9006fdbc6974301047aaff9bc6 (diff)
downloadop-kernel-dev-fef0ebdb229bedce888b63923e2a1ba4e6c6a84c.zip
op-kernel-dev-fef0ebdb229bedce888b63923e2a1ba4e6c6a84c.tar.gz
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 a774f9c20. 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>
Diffstat (limited to 'fs')
-rw-r--r--fs/ext4/namei.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
index f8be1c2..f9ed946 100644
--- a/fs/ext4/namei.c
+++ b/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;
OpenPOWER on IntegriCloud