MCPcopy Create free account
hub / github.com/F-Stack/f-stack / crcowsync

Function crcowsync

freebsd/kern/kern_prot.c:1926–1946  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1924}
1925
1926struct ucred *
1927crcowsync(void)
1928{
1929 struct thread *td;
1930 struct proc *p;
1931 struct ucred *crnew, *crold;
1932
1933 td = curthread;
1934 p = td->td_proc;
1935 PROC_LOCK_ASSERT(p, MA_OWNED);
1936
1937 MPASS(td->td_realucred == td->td_ucred);
1938 if (td->td_realucred == p->p_ucred)
1939 return (NULL);
1940
1941 crnew = crcowget(p->p_ucred);
1942 crold = crunuse(td);
1943 td->td_realucred = crnew;
1944 td->td_ucred = td->td_realucred;
1945 return (crold);
1946}
1947
1948/*
1949 * Batching.

Callers 1

thread_cow_updateFunction · 0.85

Calls 2

crcowgetFunction · 0.85
crunuseFunction · 0.85

Tested by

no test coverage detected