From d7832811a72cb0f912ff0095f02dec0f6042c185 Mon Sep 17 00:00:00 2001 From: Mateusz Guzik Date: Mon, 7 Sep 2015 20:02:56 +0000 Subject: fd: make the common case in filecaps_copy work lockless The filedesc lock is only needed if ioctls caps are present, which is a rare situation. This is a step towards reducing the scope of the filedesc lock. --- sys/kern/uipc_usrreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/kern/uipc_usrreq.c') diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c index c3a71c8fb351..efed37b8affb 100644 --- a/sys/kern/uipc_usrreq.c +++ b/sys/kern/uipc_usrreq.c @@ -1972,7 +1972,7 @@ unp_internalize(struct mbuf **controlp, struct thread *td) fdep[i] = fdev; fdep[i]->fde_file = fde->fde_file; filecaps_copy(&fde->fde_caps, - &fdep[i]->fde_caps); + &fdep[i]->fde_caps, true); unp_internalize_fp(fdep[i]->fde_file); } FILEDESC_SUNLOCK(fdesc); -- cgit v1.2.3