From 9157c95c646e21e55fe874be03881b08f5d82aca Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Wed, 13 Aug 2008 11:02:31 +0000 Subject: [PATCH] Remove a useless assignment and two unused variables. Found-by: LLVM/Clang Static Analyzer --- sys/kern/vfs_bio.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index 31eef9b1e5..af02f56a06 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -12,7 +12,7 @@ * John S. Dyson. * * $FreeBSD: src/sys/kern/vfs_bio.c,v 1.242.2.20 2003/05/28 18:38:10 alc Exp $ - * $DragonFly: src/sys/kern/vfs_bio.c,v 1.114 2008/08/10 20:03:14 dillon Exp $ + * $DragonFly: src/sys/kern/vfs_bio.c,v 1.115 2008/08/13 11:02:31 swildner Exp $ */ /* @@ -642,10 +642,7 @@ bfreekva(struct buf *bp) void bremfree(struct buf *bp) { - int old_qindex; - crit_enter(); - old_qindex = bp->b_qindex; if (bp->b_qindex != BQUEUE_NONE) { KASSERT(BUF_REFCNTNB(bp) == 1, @@ -3541,12 +3538,8 @@ vfs_clean_pages(struct buf *bp) for (i = 0; i < bp->b_xio.xio_npages; i++) { vm_page_t m = bp->b_xio.xio_pages[i]; vm_ooffset_t noff = (foff + PAGE_SIZE) & ~(off_t)PAGE_MASK; - vm_ooffset_t eoff = noff; - if (eoff > bp->b_loffset + bp->b_bufsize) - eoff = bp->b_loffset + bp->b_bufsize; vfs_page_set_valid(bp, foff, i, m); - /* vm_page_clear_dirty(m, foff & PAGE_MASK, eoff - foff); */ foff = noff; } } @@ -3622,7 +3615,7 @@ vfs_bio_clrbuf(struct buf *bp) return; } } - ea = sa = bp->b_data; + sa = bp->b_data; for(i=0;ib_xio.xio_npages;i++,sa=ea) { int j = ((vm_offset_t)sa & PAGE_MASK) / DEV_BSIZE; ea = (caddr_t)trunc_page((vm_offset_t)sa + PAGE_SIZE); -- 2.11.4.GIT