Re: ext2fs_vinit() cleanup

2016-08-08 Thread Ted Unangst
Martin Natano wrote:
> ext2fs has only one set of specops/fifoops, so no need to pass those to
> the function. This also allows to get rid of the EXT2FS_FIFOOPS define.
> 
> Ok?

ok



ext2fs_vinit() cleanup

2016-08-07 Thread Martin Natano
ext2fs has only one set of specops/fifoops, so no need to pass those to
the function. This also allows to get rid of the EXT2FS_FIFOOPS define.

Ok?

natano


Index: ufs/ext2fs/ext2fs_extern.h
===
RCS file: /cvs/src/sys/ufs/ext2fs/ext2fs_extern.h,v
retrieving revision 1.35
diff -u -p -r1.35 ext2fs_extern.h
--- ufs/ext2fs/ext2fs_extern.h  14 Jul 2014 08:54:13 -  1.35
+++ ufs/ext2fs/ext2fs_extern.h  7 Aug 2016 20:54:43 -
@@ -91,8 +91,7 @@ int   ext2fs_checkpath(struct inode *, str
 
 /* ext2fs_subr.c */
 intext2fs_bufatoff(struct inode *, off_t, char **, struct buf **);
-intext2fs_vinit(struct mount *, struct vops *, struct vops *,
-   struct vnode **);
+intext2fs_vinit(struct mount *, struct vnode **);
 #ifdef DIAGNOSTIC
 void   ext2fs_checkoverlap(struct buf *, struct inode *);
 #endif
@@ -149,7 +148,4 @@ extern struct vops ext2fs_vops;
 extern struct vops ext2fs_specvops;
 #ifdef FIFO
 extern struct vops ext2fs_fifovops;
-#define EXT2FS_FIFOOPS _fifovops
-#else
-#define EXT2FS_FIFOOPS NULL
 #endif
Index: ufs/ext2fs/ext2fs_subr.c
===
RCS file: /cvs/src/sys/ufs/ext2fs/ext2fs_subr.c,v
retrieving revision 1.34
diff -u -p -r1.34 ext2fs_subr.c
--- ufs/ext2fs/ext2fs_subr.c4 Feb 2016 12:45:03 -   1.34
+++ ufs/ext2fs/ext2fs_subr.c7 Aug 2016 20:54:43 -
@@ -145,8 +145,7 @@ ext2fs_checkoverlap(struct buf *bp, stru
  * Initialize the vnode associated with a new inode, handle aliased vnodes.
  */
 int
-ext2fs_vinit(struct mount *mp, struct vops *specops,
-struct vops *fifoops, struct vnode **vpp)
+ext2fs_vinit(struct mount *mp, struct vnode **vpp)
 {
struct inode *ip;
struct vnode *vp, *nvp;
@@ -159,7 +158,7 @@ ext2fs_vinit(struct mount *mp, struct vo
switch(vp->v_type) {
case VCHR:
case VBLK:
-   vp->v_op = specops;
+   vp->v_op = _specvops;
 
nvp = checkalias(vp, letoh32(ip->i_e2din->e2di_rdev), mp);
if (nvp != NULL) {
@@ -185,7 +184,7 @@ ext2fs_vinit(struct mount *mp, struct vo
 
case VFIFO:
 #ifdef FIFO
-   vp->v_op = fifoops;
+   vp->v_op = _fifovops;
break;
 #else
return (EOPNOTSUPP);
Index: ufs/ext2fs/ext2fs_vfsops.c
===
RCS file: /cvs/src/sys/ufs/ext2fs/ext2fs_vfsops.c,v
retrieving revision 1.93
diff -u -p -r1.93 ext2fs_vfsops.c
--- ufs/ext2fs/ext2fs_vfsops.c  19 Jun 2016 11:54:33 -  1.93
+++ ufs/ext2fs/ext2fs_vfsops.c  7 Aug 2016 20:54:43 -
@@ -918,7 +918,7 @@ ext2fs_vget(struct mount *mp, ino_t ino,
 * Initialize the vnode from the inode, check for aliases.
 * Note that the underlying vnode may have changed.
 */
-   error = ext2fs_vinit(mp, _specvops, EXT2FS_FIFOOPS, );
+   error = ext2fs_vinit(mp, );
if (error) {
vput(vp);
*vpp = NULL;