lockmgr: rename lock_fast_path to lock_flags

The routine is not much of a fast path and the flags name better describes
its purpose.
This commit is contained in:
Mateusz Guzik 2020-02-14 11:21:28 +00:00
parent 943c4932f3
commit c1b57fa7d3
3 changed files with 4 additions and 4 deletions

View File

@ -934,7 +934,7 @@ out:
}
int
lockmgr_lock_fast_path(struct lock *lk, u_int flags, struct lock_object *ilk,
lockmgr_lock_flags(struct lock *lk, u_int flags, struct lock_object *ilk,
const char *file, int line)
{
struct lock_class *class;
@ -1123,7 +1123,7 @@ out:
* 2. returning with an error after sleep
* 3. unlocking the interlock
*
* If in doubt, use lockmgr_*_fast_path.
* If in doubt, use lockmgr_lock_flags.
*/
int
lockmgr_slock(struct lock *lk, u_int flags, const char *file, int line)

View File

@ -513,7 +513,7 @@ vop_stdlock(ap)
struct mtx *ilk;
ilk = VI_MTX(vp);
return (lockmgr_lock_fast_path(vp->v_vnlock, ap->a_flags,
return (lockmgr_lock_flags(vp->v_vnlock, ap->a_flags,
&ilk->lock_object, ap->a_file, ap->a_line));
}

View File

@ -70,7 +70,7 @@ struct thread;
*/
int __lockmgr_args(struct lock *lk, u_int flags, struct lock_object *ilk,
const char *wmesg, int prio, int timo, const char *file, int line);
int lockmgr_lock_fast_path(struct lock *lk, u_int flags,
int lockmgr_lock_flags(struct lock *lk, u_int flags,
struct lock_object *ilk, const char *file, int line);
int lockmgr_slock(struct lock *lk, u_int flags, const char *file, int line);
int lockmgr_xlock(struct lock *lk, u_int flags, const char *file, int line);