diff options
author | mjg <mjg@FreeBSD.org> | 2014-07-06 22:56:34 +0000 |
---|---|---|
committer | mjg <mjg@FreeBSD.org> | 2014-07-06 22:56:34 +0000 |
commit | c9bb8da01167a7b5ceaa16259e6b6bab943b7ea9 (patch) | |
tree | 4aa49597bd2f7bcb0c343c74a2b0398a865addd7 /lib/libc/stdlib/getenv.c | |
parent | 4ec4a6585547ae29000dc768cf108796f523d42a (diff) | |
download | FreeBSD-src-c9bb8da01167a7b5ceaa16259e6b6bab943b7ea9.zip FreeBSD-src-c9bb8da01167a7b5ceaa16259e6b6bab943b7ea9.tar.gz |
MFC r267755:
Don't take filedesc lock in fdunshare().
We can read refcnt safely and only care if it is equal to 1.
If it could suddenly change from 1 to something bigger the code would be
buggy even in the previous form and transitions from > 1 to 1 are equally racy
and harmless (we copy even though there is no need).
Diffstat (limited to 'lib/libc/stdlib/getenv.c')
0 files changed, 0 insertions, 0 deletions