mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 16:50:25 -04:00
fusefs: Address -Wunused-but-set-variable warnings
Reviewed by: asomers
(cherry picked from commit 3d8562348c)
This commit is contained in:
parent
19d26be3f3
commit
b5bbbc85b8
4 changed files with 1 additions and 23 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue