Whamcloud - gitweb
LU-8372 llite: Fix suspicious dereference of pointer 'vma->vm_file' 71/21171/3
authorDmitry Eremin <dmitry.eremin@intel.com>
Wed, 6 Jul 2016 11:31:08 +0000 (14:31 +0300)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 12 Jul 2016 00:00:10 +0000 (00:00 +0000)
Remove useless LASSERT(vma->vm_file) because of if it's NULL it
will crash early in file_inode(vma->vm_file).

Test-Parameters: trivial

Change-Id: I309127fae03a77020883a0e190c4fa6ea341dfee
Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-on: http://review.whamcloud.com/21171
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/llite/llite_mmap.c

index 81c7b9e..af5fdd3 100644 (file)
@@ -448,7 +448,6 @@ static void ll_vm_open(struct vm_area_struct * vma)
        struct vvp_object *vob = cl_inode2vvp(inode);
 
        ENTRY;
-       LASSERT(vma->vm_file);
        LASSERT(atomic_read(&vob->vob_mmap_cnt) >= 0);
        atomic_inc(&vob->vob_mmap_cnt);
        EXIT;
@@ -463,7 +462,6 @@ static void ll_vm_close(struct vm_area_struct *vma)
        struct vvp_object *vob   = cl_inode2vvp(inode);
 
        ENTRY;
-       LASSERT(vma->vm_file);
        atomic_dec(&vob->vob_mmap_cnt);
        LASSERT(atomic_read(&vob->vob_mmap_cnt) >= 0);
        EXIT;