aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2026-01-11 03:51:45 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2026-01-17 02:07:51 +0000
commit3fe275c1ef45d452d1adc537b7ec1ca6444739ba (patch)
treea1b1bc13b3ac400ca72d889f4496ef51e8395081
parentb0c13e7e2446fde7c559d2b15cc3c2f8d8b959f8 (diff)
sendfile: remove calculation of unused bsize
Reviewed by: glebius, markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D54713
-rw-r--r--sys/kern/kern_sendfile.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/sys/kern/kern_sendfile.c b/sys/kern/kern_sendfile.c
index 6e924f70b2ab..a4178f5b9b2d 100644
--- a/sys/kern/kern_sendfile.c
+++ b/sys/kern/kern_sendfile.c
@@ -518,8 +518,7 @@ sendfile_swapin(vm_object_t obj, struct sf_io *sfio, int *nios, off_t off,
static int
sendfile_getobj(struct thread *td, struct file *fp, vm_object_t *obj_res,
- struct vnode **vp_res, struct shmfd **shmfd_res, off_t *obj_size,
- int *bsize)
+ struct vnode **vp_res, struct shmfd **shmfd_res, off_t *obj_size)
{
vm_object_t obj;
struct vnode *vp;
@@ -530,7 +529,6 @@ sendfile_getobj(struct thread *td, struct file *fp, vm_object_t *obj_res,
vp = *vp_res = NULL;
obj = NULL;
shmfd = *shmfd_res = NULL;
- *bsize = 0;
/*
* The file descriptor must be a regular file and have a
@@ -543,7 +541,6 @@ sendfile_getobj(struct thread *td, struct file *fp, vm_object_t *obj_res,
error = EINVAL;
goto out;
}
- *bsize = vp->v_mount->mnt_stat.f_iosize;
obj = vp->v_object;
if (obj == NULL) {
error = EINVAL;
@@ -717,7 +714,7 @@ vn_sendfile(struct file *fp, int sockfd, struct uio *hdr_uio,
struct shmfd *shmfd;
struct vattr va;
off_t off, sbytes, rem, obj_size, nobj_size;
- int bsize, error, ext_pgs_idx, hdrlen, max_pgs, softerr;
+ int error, ext_pgs_idx, hdrlen, max_pgs, softerr;
#ifdef KERN_TLS
int tls_enq_cnt;
#endif
@@ -733,7 +730,7 @@ vn_sendfile(struct file *fp, int sockfd, struct uio *hdr_uio,
softerr = 0;
use_ext_pgs = false;
- error = sendfile_getobj(td, fp, &obj, &vp, &shmfd, &obj_size, &bsize);
+ error = sendfile_getobj(td, fp, &obj, &vp, &shmfd, &obj_size);
if (error != 0)
goto out;