Convert DOINGSOFTDEP, MOUNTEDSOFTDEP, DOINGSUJ, and MOUNTEDSUJ to being

boolean expressions so that their values are not lost when assigned to
`bool' or `int' variables.

Reviewed by:  Chuck Silvers (chs)
MFC after:    3 days
Sponsored by: Netflix
This commit is contained in:
Kirk McKusick 2020-04-03 20:30:45 +00:00
parent 233c4ed93a
commit aedb9cc662

View File

@ -230,10 +230,11 @@ struct indir {
#define ITOV(ip) ((ip)->i_vnode)
/* Determine if soft dependencies are being done */
#define DOINGSOFTDEP(vp) ((vp)->v_mount->mnt_flag & (MNT_SOFTDEP | MNT_SUJ))
#define MOUNTEDSOFTDEP(mp) ((mp)->mnt_flag & (MNT_SOFTDEP | MNT_SUJ))
#define DOINGSUJ(vp) ((vp)->v_mount->mnt_flag & MNT_SUJ)
#define MOUNTEDSUJ(mp) ((mp)->mnt_flag & MNT_SUJ)
#define DOINGSOFTDEP(vp) \
(((vp)->v_mount->mnt_flag & (MNT_SOFTDEP | MNT_SUJ)) != 0)
#define MOUNTEDSOFTDEP(mp) (((mp)->mnt_flag & (MNT_SOFTDEP | MNT_SUJ)) != 0)
#define DOINGSUJ(vp) (((vp)->v_mount->mnt_flag & MNT_SUJ) != 0)
#define MOUNTEDSUJ(mp) (((mp)->mnt_flag & MNT_SUJ) != 0)
/* This overlays the fid structure (see mount.h). */
struct ufid {