Skip to content

Commit

Permalink
ext4: release buffer in failed path in dx_probe()
Browse files Browse the repository at this point in the history
If checksum fails, we should also release the buffer
read from previous iteration.

Signed-off-by: Guo Chao <yan@linux.vnet.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>-
Cc: stable@vger.kernel.org
--
 fs/ext4/namei.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  • Loading branch information
Guo Chao authored and Theodore Ts'o committed Jan 7, 2013
1 parent 96465ef commit 0ecaef0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/ext4/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,7 @@ dx_probe(const struct qstr *d_name, struct inode *dir,
ext4_warning(dir->i_sb, "Node failed checksum");
brelse(bh);
*err = ERR_BAD_DX_DIR;
goto fail;
goto fail2;
}
set_buffer_verified(bh);

Expand Down

0 comments on commit 0ecaef0

Please sign in to comment.