diff options
author | jhb <jhb@FreeBSD.org> | 2006-07-18 22:31:33 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2006-07-18 22:31:33 +0000 |
commit | 9adb8df4815a901cfc690d567d4ba0b6c63b1d5d (patch) | |
tree | 46df611dbf706bed2f3b0a205afaaa7308795c47 /sys/dev/streams/streams.c | |
parent | 4e3680467871b35d789540aab957f8eabcea03f9 (diff) | |
download | FreeBSD-src-9adb8df4815a901cfc690d567d4ba0b6c63b1d5d.zip FreeBSD-src-9adb8df4815a901cfc690d567d4ba0b6c63b1d5d.tar.gz |
Remove unnecessary locking for td_dupfd (it requires no locks).
Diffstat (limited to 'sys/dev/streams/streams.c')
-rw-r--r-- | sys/dev/streams/streams.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/sys/dev/streams/streams.c b/sys/dev/streams/streams.c index 65fd83a..e303be4 100644 --- a/sys/dev/streams/streams.c +++ b/sys/dev/streams/streams.c @@ -198,12 +198,8 @@ streamsopen(struct cdev *dev, int oflags, int devtype, struct thread *td) int family; struct proc *p = td->td_proc; - PROC_LOCK(p); - if (td->td_dupfd >= 0) { - PROC_UNLOCK(p); + if (td->td_dupfd >= 0) return ENODEV; - } - PROC_UNLOCK(p); switch (minor(dev)) { case dev_udp: @@ -280,9 +276,7 @@ streamsopen(struct cdev *dev, int oflags, int devtype, struct thread *td) (void)svr4_stream_get(fp); fdrop(fp, td); - PROC_LOCK(p); td->td_dupfd = fd; - PROC_UNLOCK(p); return ENXIO; } @@ -324,9 +318,7 @@ svr4_ptm_alloc(td) case ENXIO: return error; case 0: - PROC_LOCK(p); td->td_dupfd = td->td_retval[0]; - PROC_UNLOCK(p); return ENXIO; default: if (ttynumbers[++n] == '\0') { |