From bb3a12f0e55382b668066d8f8816f8073f5533d3 Mon Sep 17 00:00:00 2001 From: Mateusz Guzik Date: Mon, 28 Dec 2020 09:29:57 +0000 Subject: [PATCH] fd: inline pwd_get_smr Tested by: pho --- sys/kern/kern_descrip.c | 10 ---------- sys/sys/filedesc.h | 2 +- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index a510ad90a618..ff11ae4f1a61 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -3672,16 +3672,6 @@ pwd_hold(struct thread *td) return (pwd); } -struct pwd * -pwd_get_smr(void) -{ - struct pwd *pwd; - - pwd = vfs_smr_entered_load(&curproc->p_pd->pd_pwd); - MPASS(pwd != NULL); - return (pwd); -} - static struct pwd * pwd_alloc(void) { diff --git a/sys/sys/filedesc.h b/sys/sys/filedesc.h index 53d289366580..ae2232814136 100644 --- a/sys/sys/filedesc.h +++ b/sys/sys/filedesc.h @@ -329,7 +329,7 @@ pwd_set(struct pwddesc *pdp, struct pwd *newpwd) smr_serialized_store(&pdp->pd_pwd, newpwd, (PWDDESC_ASSERT_XLOCKED(pdp), true)); } -struct pwd *pwd_get_smr(void); +#define pwd_get_smr() vfs_smr_entered_load(&curproc->p_pd->pd_pwd) #endif /* _KERNEL */