summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2002-06-23 01:48:22 +0000
committeralc <alc@FreeBSD.org>2002-06-23 01:48:22 +0000
commit4bc342b5535ab65f0c43d675318f1186a9eb5272 (patch)
treea5834e203d22bfbbee63c55af4fa461730880be1 /sys
parent4e1ef42a337f140ed297826d20351653da2eb61a (diff)
downloadFreeBSD-src-4bc342b5535ab65f0c43d675318f1186a9eb5272.zip
FreeBSD-src-4bc342b5535ab65f0c43d675318f1186a9eb5272.tar.gz
o Remove the unnecessary acquisition and release of Giant around fdrop()
in mmap(2).
Diffstat (limited to 'sys')
-rw-r--r--sys/vm/vm_mmap.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/vm/vm_mmap.c b/sys/vm/vm_mmap.c
index 6af6eb8..4911ef7 100644
--- a/sys/vm/vm_mmap.c
+++ b/sys/vm/vm_mmap.c
@@ -423,11 +423,12 @@ mmap(td, uap)
flags, handle, pos);
if (error == 0)
td->td_retval[0] = (register_t) (addr + pageoff);
- mtx_lock(&Giant);
+ goto done2;
done:
+ mtx_unlock(&Giant);
+done2:
if (fp)
fdrop(fp, td);
- mtx_unlock(&Giant);
return (error);
}
OpenPOWER on IntegriCloud