nullfs: add missing VOP_STAT handling
Tested by: pho
This commit is contained in:
parent
f8024c3915
commit
fc9fcee01a
@ -182,6 +182,7 @@
|
||||
#include <sys/namei.h>
|
||||
#include <sys/sysctl.h>
|
||||
#include <sys/vnode.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include <fs/nullfs/null.h>
|
||||
|
||||
@ -484,8 +485,20 @@ null_setattr(struct vop_setattr_args *ap)
|
||||
}
|
||||
|
||||
/*
|
||||
* We handle getattr only to change the fsid.
|
||||
* We handle stat and getattr only to change the fsid.
|
||||
*/
|
||||
static int
|
||||
null_stat(struct vop_stat_args *ap)
|
||||
{
|
||||
int error;
|
||||
|
||||
if ((error = null_bypass((struct vop_generic_args *)ap)) != 0)
|
||||
return (error);
|
||||
|
||||
ap->a_sb->st_dev = ap->a_vp->v_mount->mnt_stat.f_fsid.val[0];
|
||||
return (0);
|
||||
}
|
||||
|
||||
static int
|
||||
null_getattr(struct vop_getattr_args *ap)
|
||||
{
|
||||
@ -918,6 +931,7 @@ struct vop_vector null_vnodeops = {
|
||||
.vop_accessx = null_accessx,
|
||||
.vop_advlockpurge = vop_stdadvlockpurge,
|
||||
.vop_bmap = VOP_EOPNOTSUPP,
|
||||
.vop_stat = null_stat,
|
||||
.vop_getattr = null_getattr,
|
||||
.vop_getwritemount = null_getwritemount,
|
||||
.vop_inactive = null_inactive,
|
||||
|
Loading…
Reference in New Issue
Block a user