From nobody Thu Jan 27 14:25:14 2022 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id A3AFE19688AB; Thu, 27 Jan 2022 14:25:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Jl2tL4GK6z3mgs; Thu, 27 Jan 2022 14:25:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643293514; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WTG8ihZk+dvoIK2NYfJvy1iX90+YzXi+G3KAFg79mXM=; b=NRdZcNhE7OHlSGCxPU46IdWjWf+OAIJeLLY/K28ydSnNXrRPnSFy0BIt2TqcPPGkDaEqyh ieT3BmOcayVF0u++XF0zjoPa+UdVLqQDjqKMzvGR+DOYQziitvvLt8eJaU+b/IFkumIBrx 0wV3ZJyrl66p1xwJg1mDmGFBA0ZR8gULLqZuurDNKLyUXt/6SGyF3YMN1NCQ3PG8UW8flr OfpwFGw8bU/O/NLjN9Jb0/7Zoy6jBKXHjeCuXB+gvy3R66RuspQ2UKxYTc9VmFFgV9jhJA TiGbpiiic6JGqMq2rFsdJ+CzZTs4qNjqRcpPz21bPo/fWOybnbIvrXmXUrjJDw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7250A18623; Thu, 27 Jan 2022 14:25:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 20REPEQb039105; Thu, 27 Jan 2022 14:25:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 20REPE0q039104; Thu, 27 Jan 2022 14:25:14 GMT (envelope-from git) Date: Thu, 27 Jan 2022 14:25:14 GMT Message-Id: <202201271425.20REPE0q039104@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: b5bbbc85b8a4 - stable/13 - fusefs: Address -Wunused-but-set-variable warnings List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: b5bbbc85b8a41195bc0d3d6f5fe981b195519369 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643293514; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WTG8ihZk+dvoIK2NYfJvy1iX90+YzXi+G3KAFg79mXM=; b=rB/g3Qh6h8GJ5K/wcs94B76UnV90Be2HCFKTA+pstqx/E3yOFkAMUsKc8MQqpJiRr+wnsl 3RhncRVVzKGobrSzj2CgqeYs5kzrNee4leyrG4te/kg1Sfwq743oPngoumo9oQPSNTz78J DPiwGcqz2jJWTa7mrHJ8ySXXZJuCR0y/mPB1tTvEooNJ0FzsmKbsq4IKox0i+CUQIoK6VI rDH0kev6SCUiZldVAFr1X/6b5/BwjouFgBSGPpgmv8zJDi6qPBS5Yj0Lp7UC1A4EI2oniV oouxDqEWGSSonDDXpkzAiQHS9pGWoyz1L3vq6Zi76oBfpzaVDw//Yd6LAjjhgg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1643293514; a=rsa-sha256; cv=none; b=uOG/lYzjr9G61rw2FKzTf3DqEUoS6aAIob6jXJLZab/mXjHW0pVxWW4AKBUrCd8ROQl9pa gj5+fPE+OUZXGJdc6HF6AaoV6MNG7EKrP2vADVj8Ma9FBQBfzJck0WjBPCKXxCyBtAp+JY T9gNmD2RCTAMnEr+3KTKiIlcRI+ql7xaNsVRbY8p9kbGVOvXyBcRpaQmB4Ww6eai+mPdUz QHyToXhXWs0FJVUi1VSe1C7EJRk2WHOAHZzV/cGNkO+L1b4fwJqlc3DfccnM2W6MoUtDQ5 Vjif6R9aCE3lQ41XCKWFLp2soJlsNFTA0xQkRvqw/glWW/73xU6CbuT75d2aTg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=b5bbbc85b8a41195bc0d3d6f5fe981b195519369 commit b5bbbc85b8a41195bc0d3d6f5fe981b195519369 Author: Mark Johnston AuthorDate: 2022-01-20 13:25:00 +0000 Commit: Mark Johnston CommitDate: 2022-01-27 14:24:53 +0000 fusefs: Address -Wunused-but-set-variable warnings Reviewed by: asomers (cherry picked from commit 3d8562348c9cf1a6bdc32382f5f45a0534da094a) --- sys/fs/fuse/fuse_internal.c | 8 -------- sys/fs/fuse/fuse_io.c | 6 ------ sys/fs/fuse/fuse_node.c | 3 +-- sys/fs/fuse/fuse_vnops.c | 7 ------- 4 files changed, 1 insertion(+), 23 deletions(-) diff --git a/sys/fs/fuse/fuse_internal.c b/sys/fs/fuse/fuse_internal.c index 846d94a81759..9dac4f7a17be 100644 --- a/sys/fs/fuse/fuse_internal.c +++ b/sys/fs/fuse/fuse_internal.c @@ -169,14 +169,12 @@ fuse_internal_access(struct vnode *vp, int err = 0; uint32_t mask = F_OK; int dataflags; - int vtype; struct mount *mp; struct fuse_dispatcher fdi; struct fuse_access_in *fai; struct fuse_data *data; mp = vnode_mount(vp); - vtype = vnode_vtype(vp); data = fuse_get_mpdata(mp); dataflags = data->dataflags; @@ -1170,18 +1168,14 @@ int fuse_internal_setattr(struct vnode *vp, struct vattr *vap, struct mount *mp; pid_t pid = td->td_proc->p_pid; struct fuse_data *data; - int dataflags; int err = 0; enum vtype vtyp; - int sizechanged = -1; - uint64_t newsize = 0; ASSERT_VOP_ELOCKED(vp, __func__); mp = vnode_mount(vp); fvdat = VTOFUD(vp); data = fuse_get_mpdata(mp); - dataflags = data->dataflags; fdisp_init(&fdi, sizeof(*fsai)); fdisp_make_vp(&fdi, FUSE_SETATTR, vp, td, cred); @@ -1205,8 +1199,6 @@ int fuse_internal_setattr(struct vnode *vp, struct vattr *vap, /*Truncate to a new value. */ fsai->size = vap->va_size; - sizechanged = 1; - newsize = vap->va_size; fsai->valid |= FATTR_SIZE; fuse_filehandle_getrw(vp, FWRITE, &fufh, cred, pid); diff --git a/sys/fs/fuse/fuse_io.c b/sys/fs/fuse/fuse_io.c index 991def5ba3eb..8d2e79d0a073 100644 --- a/sys/fs/fuse/fuse_io.c +++ b/sys/fs/fuse/fuse_io.c @@ -467,7 +467,6 @@ fuse_write_biobackend(struct vnode *vp, struct uio *uio, off_t filesize; int bcount; int n, on, seqcount, err = 0; - bool last_page; const int biosize = fuse_iosize(vp); @@ -518,11 +517,6 @@ again: extending = true; bcount = on + n; } - if (howmany(((off_t)lbn * biosize + on + n - 1), PAGE_SIZE) >= - howmany(filesize, PAGE_SIZE)) - last_page = true; - else - last_page = false; if (direct_append) { /* * Take care to preserve the buffer's B_CACHE state so diff --git a/sys/fs/fuse/fuse_node.c b/sys/fs/fuse/fuse_node.c index 450760a624ff..258053dfb0b7 100644 --- a/sys/fs/fuse/fuse_node.c +++ b/sys/fs/fuse/fuse_node.c @@ -447,9 +447,8 @@ fuse_vnode_setsize(struct vnode *vp, off_t newsize, bool from_server) * The FUSE server changed the file size behind our back. We * should invalidate the entire cache. */ - daddr_t left_lbn, end_lbn; + daddr_t end_lbn; - left_lbn = oldsize / iosize; end_lbn = howmany(newsize, iosize); v_inval_buf_range(vp, 0, end_lbn, iosize); } diff --git a/sys/fs/fuse/fuse_vnops.c b/sys/fs/fuse/fuse_vnops.c index 1fcc888d8169..da1c5ec3cbce 100644 --- a/sys/fs/fuse/fuse_vnops.c +++ b/sys/fs/fuse/fuse_vnops.c @@ -1392,7 +1392,6 @@ fuse_vnop_lookup(struct vop_lookup_args *ap) bool did_lookup = false; struct fuse_entry_out *feo = NULL; enum vtype vtyp; /* vnode type of target */ - off_t filesize; /* filesize of target */ uint64_t nid; @@ -1425,12 +1424,10 @@ fuse_vnop_lookup(struct vop_lookup_args *ap) return ENOENT; /* .. is obviously a directory */ vtyp = VDIR; - filesize = 0; } else if (cnp->cn_namelen == 1 && *(cnp->cn_nameptr) == '.') { nid = VTOI(dvp); /* . is obviously a directory */ vtyp = VDIR; - filesize = 0; } else { struct timespec timeout; int ncpticks; /* here to accomodate for API contract */ @@ -1504,7 +1501,6 @@ fuse_vnop_lookup(struct vop_lookup_args *ap) } } vtyp = IFTOVT(feo->attr.mode); - filesize = feo->attr.size; } if (lookup_err && (!fdi.answ_stat || lookup_err != ENOENT)) { fdisp_destroy(&fdi); @@ -1689,7 +1685,6 @@ fuse_vnop_open(struct vop_open_args *ap) struct thread *td = ap->a_td; struct ucred *cred = ap->a_cred; pid_t pid = td->td_proc->p_pid; - struct fuse_vnode_data *fvdat; if (fuse_isdeadfs(vp)) return ENXIO; @@ -1698,8 +1693,6 @@ fuse_vnop_open(struct vop_open_args *ap) if ((a_mode & (FREAD | FWRITE | FEXEC)) == 0) return EINVAL; - fvdat = VTOFUD(vp); - if (fuse_filehandle_validrw(vp, a_mode, cred, pid)) { fuse_vnode_open(vp, 0, td); return 0;