vfs: simplify vop_stdlock/unlock

The interlock pointer is non-NULL by definition and the compiler see through
that and eliminates the NULL checks. Just remove them from the code as they
play no role.

No difference in generated assembly.
This commit is contained in:
Mateusz Guzik 2018-05-20 04:45:05 +00:00
parent 47d2a58560
commit 2186ee6e72
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=333916

View File

@ -505,7 +505,7 @@ vop_stdlock(ap)
ilk = VI_MTX(vp);
return (lockmgr_lock_fast_path(vp->v_vnlock, ap->a_flags,
(ilk != NULL) ? &ilk->lock_object : NULL, ap->a_file, ap->a_line));
&ilk->lock_object, ap->a_file, ap->a_line));
}
/* See above. */
@ -521,7 +521,7 @@ vop_stdunlock(ap)
ilk = VI_MTX(vp);
return (lockmgr_unlock_fast_path(vp->v_vnlock, ap->a_flags,
(ilk != NULL) ? &ilk->lock_object : NULL));
&ilk->lock_object));
}
/* See above. */