From: Dmitry Monakhov Date: Mon, 21 Apr 2014 18:38:14 +0000 (-0400) Subject: ext4: remove obsoleted check X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=236f5ecb4a5876977837376729a7599cc1ab2cc3;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git 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 Signed-off-by: Theodore Ts'o --- diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c index 1cb84f78909e..a683f958f128 100644 --- a/fs/ext4/namei.c +++ b/fs/ext4/namei.c @@ -2510,8 +2510,7 @@ static int empty_dir(struct inode *inode) ext4_rec_len_from_disk(de1->rec_len, sb->s_blocksize); de = ext4_next_entry(de1, sb->s_blocksize); while (offset < inode->i_size) { - if (!bh || - (void *) de >= (void *) (bh->b_data+sb->s_blocksize)) { + if ((void *) de >= (void *) (bh->b_data+sb->s_blocksize)) { unsigned int lblock; err = 0; brelse(bh);