-/* $OpenBSD: fuse_lookup.c,v 1.11 2016/03/19 12:04:15 natano Exp $ */
+/* $OpenBSD: fuse_lookup.c,v 1.12 2016/08/12 20:18:44 natano Exp $ */
/*
* Copyright (c) 2012-2013 Sylvestre Gallon <ccna.syl@gmail.com>
*
goto out;
tdp->v_type = IFTOVT(fbuf->fb_vattr.va_mode);
- VTOI(tdp)->vtype = tdp->v_type;
*vpp = tdp;
cnp->cn_flags |= SAVENAME;
} else {
error = VFS_VGET(fmp->mp, nid, &tdp);
- if (!error) {
+ if (!error)
tdp->v_type = IFTOVT(fbuf->fb_vattr.va_mode);
- VTOI(tdp)->vtype = tdp->v_type;
- }
update_vattr(fmp->mp, &fbuf->fb_vattr);
-/* $OpenBSD: fuse_vnops.c,v 1.28 2016/06/19 11:54:33 natano Exp $ */
+/* $OpenBSD: fuse_vnops.c,v 1.29 2016/08/12 20:18:44 natano Exp $ */
/*
* Copyright (c) 2012-2013 Sylvestre Gallon <ccna.syl@gmail.com>
*
return (ENXIO);
isdir = 0;
- if (ip->vtype == VDIR)
+ if (ap->a_vp->v_type == VDIR)
isdir = 1;
else {
if ((ap->a_mode & FREAD) && (ap->a_mode & FWRITE)) {
if (!fmp->sess_init)
return (0);
- if (ip->vtype == VDIR) {
+ if (ap->a_vp->v_type == VDIR) {
isdir = 1;
if (ip->fufh[fufh_type].fh_type != FUFH_INVALID)
}
tdp->v_type = VLNK;
- VTOI(tdp)->vtype = tdp->v_type;
VTOI(tdp)->parent = dp->ufs_ino.i_number;
VN_KNOTE(ap->a_dvp, NOTE_WRITE);
fufh = &(ip->fufh[type]);
if (fufh->fh_type != FUFH_INVALID)
fusefs_file_close(fmp, ip, fufh->fh_type, type,
- (ip->vtype == VDIR), ap->a_p);
+ (vp->v_type == VDIR), ap->a_p);
}
error = VOP_GETATTR(vp, &vattr, cred, p);
if (fufh->fh_type != FUFH_INVALID) {
printf("fusefs: vnode being reclaimed is valid\n");
fusefs_file_close(fmp, ip, fufh->fh_type, type,
- (ip->vtype == VDIR), ap->a_p);
+ (vp->v_type == VDIR), ap->a_p);
}
}
/*
}
tdp->v_type = IFTOVT(fbuf->fb_io_mode);
- VTOI(tdp)->vtype = tdp->v_type;
-
if (dvp != NULL && dvp->v_type == VDIR)
VTOI(tdp)->parent = ip->ufs_ino.i_number;
}
tdp->v_type = IFTOVT(fbuf->fb_io_mode);
- VTOI(tdp)->vtype = tdp->v_type;
-
if (dvp != NULL && dvp->v_type == VDIR)
VTOI(tdp)->parent = ip->ufs_ino.i_number;
* "ls" or "pwd" with the "." directory entry missing, and "cd .."
* doesn't work if the ".." entry is missing.
*/
- if (ip->vtype == VDIR) {
+ if (fvp->v_type == VDIR) {
/*
* Avoid ".", "..", and aliases of "." for obvious reasons.
*/
}
tdp->v_type = IFTOVT(fbuf->fb_io_mode);
- VTOI(tdp)->vtype = tdp->v_type;
-
if (dvp != NULL && dvp->v_type == VDIR)
VTOI(tdp)->parent = ip->ufs_ino.i_number;