add patch avoid-unneeded-lookup-when-xattr-name-is-invalid
[ext4-patch-queue.git] / remove-obsoleted-check
blob072a2a2705c0c6b4836aac0e10560cf2daad3400
1 ext4: remove obsoleted check
3 From: Dmitry Monakhov <dmonakhov@openvz.org>
5 BH can not be NULL at this point, ext4_read_dirblock() always return
6 non null value, and we already have done all necessery checks.
8 Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
9 ---
10  fs/ext4/namei.c |    3 +--
11  1 files changed, 1 insertions(+), 2 deletions(-)
13 diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
14 index 1cb84f7..a683f95 100644
15 --- a/fs/ext4/namei.c
16 +++ b/fs/ext4/namei.c
17 @@ -2510,8 +2510,7 @@ static int empty_dir(struct inode *inode)
18                  ext4_rec_len_from_disk(de1->rec_len, sb->s_blocksize);
19         de = ext4_next_entry(de1, sb->s_blocksize);
20         while (offset < inode->i_size) {
21 -               if (!bh ||
22 -                   (void *) de >= (void *) (bh->b_data+sb->s_blocksize)) {
23 +               if ((void *) de >= (void *) (bh->b_data+sb->s_blocksize)) {
24                         unsigned int lblock;
25                         err = 0;
26                         brelse(bh);
27 -- 
28 1.7.1