git: 3fe275c1ef45 - main - sendfile: remove calculation of unused bsize
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 17 Jan 2026 02:08:35 UTC
The branch main has been updated by kib:
URL: https://cgit.FreeBSD.org/src/commit/?id=3fe275c1ef45d452d1adc537b7ec1ca6444739ba
commit 3fe275c1ef45d452d1adc537b7ec1ca6444739ba
Author: Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2026-01-11 03:51:45 +0000
Commit: Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2026-01-17 02:07:51 +0000
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
---
sys/kern/kern_sendfile.c | 9 +++------
1 file 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;