mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-30 04:22:44 +00:00
nullfs: Use an a_gen field to cast to vop_generic_args
Instead of casting a vop_F_args object to vop_generic_args, use a vop_F_args.a_gen field when calling null_bypass(). This way we don't hardcode the vop_generic_args data type in the callers of null_bypass(). Before this change, there were 3 null_bypass() calls using a vop_F_args.a_gen field and 5 null_bypass() calls using a cast to vop_generic_args. This change makes all null_bypass() calls consistent and easier to maintain. Pointed out by: jrtc27 Reviewed by: kib, oshogbo Accepted by: oshogbo (mentor) Differential Revision: https://reviews.freebsd.org/D37359
This commit is contained in:
parent
9776aba345
commit
5c3af1d697
@ -528,7 +528,7 @@ null_setattr(struct vop_setattr_args *ap)
|
||||
}
|
||||
}
|
||||
|
||||
return (null_bypass((struct vop_generic_args *)ap));
|
||||
return (null_bypass(&ap->a_gen));
|
||||
}
|
||||
|
||||
/*
|
||||
@ -539,7 +539,7 @@ null_stat(struct vop_stat_args *ap)
|
||||
{
|
||||
int error;
|
||||
|
||||
if ((error = null_bypass((struct vop_generic_args *)ap)) != 0)
|
||||
if ((error = null_bypass(&ap->a_gen)) != 0)
|
||||
return (error);
|
||||
|
||||
ap->a_sb->st_dev = ap->a_vp->v_mount->mnt_stat.f_fsid.val[0];
|
||||
@ -551,7 +551,7 @@ null_getattr(struct vop_getattr_args *ap)
|
||||
{
|
||||
int error;
|
||||
|
||||
if ((error = null_bypass((struct vop_generic_args *)ap)) != 0)
|
||||
if ((error = null_bypass(&ap->a_gen)) != 0)
|
||||
return (error);
|
||||
|
||||
ap->a_vap->va_fsid = ap->a_vp->v_mount->mnt_stat.f_fsid.val[0];
|
||||
@ -584,7 +584,7 @@ null_access(struct vop_access_args *ap)
|
||||
break;
|
||||
}
|
||||
}
|
||||
return (null_bypass((struct vop_generic_args *)ap));
|
||||
return (null_bypass(&ap->a_gen));
|
||||
}
|
||||
|
||||
static int
|
||||
@ -610,7 +610,7 @@ null_accessx(struct vop_accessx_args *ap)
|
||||
break;
|
||||
}
|
||||
}
|
||||
return (null_bypass((struct vop_generic_args *)ap));
|
||||
return (null_bypass(&ap->a_gen));
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user