Skip to content

Commit 236f5ec

Browse files
Dmitry Monakhovtytso
authored andcommitted
ext4: remove obsoleted check
BH can not be NULL at this point, ext4_read_dirblock() always return non null value, and we already have done all necessery checks. Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
1 parent 202ee5d commit 236f5ec

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

‎fs/ext4/namei.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2510,8 +2510,7 @@ static int empty_dir(struct inode *inode)
25102510
ext4_rec_len_from_disk(de1->rec_len, sb->s_blocksize);
25112511
de = ext4_next_entry(de1, sb->s_blocksize);
25122512
while (offset < inode->i_size) {
2513-
if (!bh ||
2514-
(void *) de >= (void *) (bh->b_data+sb->s_blocksize)) {
2513+
if ((void *) de >= (void *) (bh->b_data+sb->s_blocksize)) {
25152514
unsigned int lblock;
25162515
err = 0;
25172516
brelse(bh);

0 commit comments

Comments
 (0)