ext4: remove obsoleted check
authorDmitry Monakhov <dmonakhov@openvz.org>
Mon, 21 Apr 2014 18:38:14 +0000 (14:38 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 21 Apr 2014 18:38:14 +0000 (14:38 -0400)
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>
fs/ext4/namei.c

index 1cb84f78909ee2d96a5721569cdbd383e9011a35..a683f958f12859df492d7eb93b8c51c48cec6ee6 100644 (file)
@@ -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);