Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8d897d25 authored by Dmitry Eremin's avatar Dmitry Eremin Committed by Greg Kroah-Hartman
Browse files

staging/lustre/llite: Fix suspicious dereference of pointer 'vma->vm_file'



Remove useless LASSERT(vma->vm_file) because of if it's NULL it
will crash early in file_inode(vma->vm_file).

Signed-off-by: default avatarDmitry Eremin <dmitry.eremin@intel.com>
Reviewed-on: http://review.whamcloud.com/21171
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8372


Reviewed-by: default avatarJohn L. Hammond <john.hammond@intel.com>
Reviewed-by: default avatarBob Glossman <bob.glossman@intel.com>
Signed-off-by: default avatarOleg Drokin <green@linuxhacker.ru>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 76cc3abe
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -429,7 +429,6 @@ static void ll_vm_open(struct vm_area_struct *vma)
	struct inode *inode    = file_inode(vma->vm_file);
	struct vvp_object *vob = cl_inode2vvp(inode);

	LASSERT(vma->vm_file);
	LASSERT(atomic_read(&vob->vob_mmap_cnt) >= 0);
	atomic_inc(&vob->vob_mmap_cnt);
}
@@ -442,7 +441,6 @@ static void ll_vm_close(struct vm_area_struct *vma)
	struct inode      *inode = file_inode(vma->vm_file);
	struct vvp_object *vob   = cl_inode2vvp(inode);

	LASSERT(vma->vm_file);
	atomic_dec(&vob->vob_mmap_cnt);
	LASSERT(atomic_read(&vob->vob_mmap_cnt) >= 0);
}