In vnode_pager_generic_getpages() vp->v_mount is dereferenced in the
beginning, thus can't be NULL. Sponsored by: Nginx, Inc.
This commit is contained in:
parent
1230159bc7
commit
2a5eef69a6
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=274715
@ -714,7 +714,6 @@ vnode_pager_generic_getpages(struct vnode *vp, vm_page_t *m, int bytecount,
|
||||
int runpg;
|
||||
int runend;
|
||||
struct buf *bp;
|
||||
struct mount *mp;
|
||||
int count;
|
||||
int error;
|
||||
|
||||
@ -906,8 +905,7 @@ vnode_pager_generic_getpages(struct vnode *vp, vm_page_t *m, int bytecount,
|
||||
* and map the pages to be read into the kva, if the filesystem
|
||||
* requires mapped buffers.
|
||||
*/
|
||||
mp = vp->v_mount;
|
||||
if (mp != NULL && (mp->mnt_kern_flag & MNTK_UNMAPPED_BUFS) != 0 &&
|
||||
if ((vp->v_mount->mnt_kern_flag & MNTK_UNMAPPED_BUFS) != 0 &&
|
||||
unmapped_buf_allowed) {
|
||||
bp->b_data = unmapped_buf;
|
||||
bp->b_kvabase = unmapped_buf;
|
||||
@ -955,7 +953,7 @@ vnode_pager_generic_getpages(struct vnode *vp, vm_page_t *m, int bytecount,
|
||||
}
|
||||
if ((bp->b_flags & B_UNMAPPED) == 0)
|
||||
pmap_qremove(kva, count);
|
||||
if (mp != NULL && (mp->mnt_kern_flag & MNTK_UNMAPPED_BUFS) != 0) {
|
||||
if ((vp->v_mount->mnt_kern_flag & MNTK_UNMAPPED_BUFS) != 0) {
|
||||
bp->b_data = (caddr_t)kva;
|
||||
bp->b_kvabase = (caddr_t)kva;
|
||||
bp->b_flags &= ~B_UNMAPPED;
|
||||
|
Loading…
Reference in New Issue
Block a user