diff options
author | Alan Cox <alc@FreeBSD.org> | 2004-01-31 05:42:58 +0000 |
---|---|---|
committer | Alan Cox <alc@FreeBSD.org> | 2004-01-31 05:42:58 +0000 |
commit | bfb7317ebf98d6df64d332489ee87b6849a10bbc (patch) | |
tree | 17c0b41d78edc693a80badcac8e363623a323c43 /sys/ufs | |
parent | a99e07ba17465db6225d3cb72895afb7b06ec517 (diff) | |
download | src-bfb7317ebf98d6df64d332489ee87b6849a10bbc.tar.gz src-bfb7317ebf98d6df64d332489ee87b6849a10bbc.zip |
Remove unnecessary vm object reference and deallocate calls from ffs_read()
and ffs_write(). These calls trace their origins to the dead vfs_ioopt
code, first appearing in revision 1.39 of ufs_readwrite.c.
Observed by: bde
Discussed with: tegge
Notes
Notes:
svn path=/head/; revision=125259
Diffstat (limited to 'sys/ufs')
-rw-r--r-- | sys/ufs/ffs/ffs_vnops.c | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/sys/ufs/ffs/ffs_vnops.c b/sys/ufs/ffs/ffs_vnops.c index 654cc5a0eeff..7f3988b1c879 100644 --- a/sys/ufs/ffs/ffs_vnops.c +++ b/sys/ufs/ffs/ffs_vnops.c @@ -350,7 +350,6 @@ ffs_read(ap) int error, orig_resid; int seqcount; int ioflag; - vm_object_t object; vp = ap->a_vp; uio = ap->a_uio; @@ -403,10 +402,6 @@ ffs_read(ap) return (0); } - object = vp->v_object; - if (object) { - vm_object_reference(object); - } /* * Ok so we couldn't do it all in one vm trick... @@ -557,10 +552,6 @@ ffs_read(ap) } } - if (object) { - VM_OBJECT_LOCK(object); - vm_object_vndeallocate(object); - } if ((error == 0 || uio->uio_resid != orig_resid) && (vp->v_mount->mnt_flag & MNT_NOATIME) == 0) ip->i_flag |= IN_ACCESS; @@ -589,7 +580,6 @@ ffs_write(ap) off_t osize; int seqcount; int blkoffset, error, extended, flags, ioflag, resid, size, xfersize; - vm_object_t object; vp = ap->a_vp; uio = ap->a_uio; @@ -607,10 +597,6 @@ ffs_write(ap) seqcount = ap->a_ioflag >> IO_SEQSHIFT; ip = VTOI(vp); - object = vp->v_object; - if (object) { - vm_object_reference(object); - } #ifdef DIAGNOSTIC if (uio->uio_rw != UIO_WRITE) @@ -622,10 +608,6 @@ ffs_write(ap) if (ioflag & IO_APPEND) uio->uio_offset = ip->i_size; if ((ip->i_flags & APPEND) && uio->uio_offset != ip->i_size) { - if (object) { - VM_OBJECT_LOCK(object); - vm_object_vndeallocate(object); - } return (EPERM); } /* FALLTHROUGH */ @@ -645,10 +627,6 @@ ffs_write(ap) KASSERT(uio->uio_offset >= 0, ("ffs_write: uio->uio_offset < 0")); fs = ip->i_fs; if ((uoff_t)uio->uio_offset + uio->uio_resid > fs->fs_maxfilesize) { - if (object) { - VM_OBJECT_LOCK(object); - vm_object_vndeallocate(object); - } return (EFBIG); } /* @@ -662,10 +640,6 @@ ffs_write(ap) PROC_LOCK(td->td_proc); psignal(td->td_proc, SIGXFSZ); PROC_UNLOCK(td->td_proc); - if (object) { - VM_OBJECT_LOCK(object); - vm_object_vndeallocate(object); - } return (EFBIG); } @@ -785,10 +759,6 @@ ffs_write(ap) } else if (resid > uio->uio_resid && (ioflag & IO_SYNC)) error = UFS_UPDATE(vp, 1); - if (object) { - VM_OBJECT_LOCK(object); - vm_object_vndeallocate(object); - } return (error); } |