Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
ffs_vnops.c changes break kernels w/o WAPBL
Recent changes to "sys/ufs/ffs/ffs_vnops.c" break building kernels which
don't include "options WAPBL" (e.g. NET4501).
The complaint is about "struct mount *mp" being set but not used.
In the above-mentioned file in "ffs_spec_fsync(void *v)", "struct mount *mp"
is used only in a block of code guarded with "#ifdef WAPBL".
The following patch adds the same guard to the declaration and setting
of "struct mount *mp". This allows the NET4501 kernel to build.
+Index: sys/ufs/ffs/ffs_vnops.c
+===================================================================
+RCS file: /cvsroot/src/sys/ufs/ffs/ffs_vnops.c,v
+retrieving revision 1.126
+diff -u -p -r1.126 ffs_vnops.c
+--- sys/ufs/ffs/ffs_vnops.c 1 Mar 2017 10:42:45 -0000 1.126
++++ sys/ufs/ffs/ffs_vnops.c 1 Mar 2017 20:10:33 -0000
+@@ -283,12 +283,16 @@ ffs_spec_fsync(void *v)
+ } */ *ap = v;
+ int error, flags, uflags;
+ struct vnode *vp;
++#ifdef WAPBL
+ struct mount *mp;
++#endif /* WAPBL */
+
+ flags = ap->a_flags;
+ uflags = UPDATE_CLOSE | ((flags & FSYNC_WAIT) ? UPDATE_WAIT : 0);
+ vp = ap->a_vp;
++#ifdef WAPBL
+ mp = vp->v_mount;
++#endif /* WAPBL */
+
+ error = spec_fsync(v);
+ if (error)
--
|/"\ John D. Baker, KN5UKS NetBSD Darwin/MacOS X
|\ / jdbaker[snail]mylinuxisp[flyspeck]com OpenBSD FreeBSD
| X No HTML/proprietary data in email. BSD just sits there and works!
|/ \ GPGkeyID: D703 4A7E 479F 63F8 D3F4 BD99 9572 8F23 E4AD 1645
Home |
Main Index |
Thread Index |
Old Index