diff options
author | Michael I. Bushnell <mib@gnu.org> | 1994-07-13 19:50:23 +0000 |
---|---|---|
committer | Michael I. Bushnell <mib@gnu.org> | 1994-07-13 19:50:23 +0000 |
commit | 5f8a317492cf2dc67de62231ae7674bd988fb875 (patch) | |
tree | db3975d6cbe6104dfc87a2438259a51159aca732 /libdiskfs | |
parent | 0e54a1f1e388c1c647d6c1bf64cd3d89e0b21ef8 (diff) |
entered into RCS
Diffstat (limited to 'libdiskfs')
-rw-r--r-- | libdiskfs/file-getcontrol.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libdiskfs/file-getcontrol.c b/libdiskfs/file-getcontrol.c index 6c53a12f..4ea2ae8e 100644 --- a/libdiskfs/file-getcontrol.c +++ b/libdiskfs/file-getcontrol.c @@ -33,7 +33,11 @@ diskfs_S_file_getcontrol (struct protid *cred, error = EPERM; else { - *control = ports_get_right (diskfs_control_port); + spin_lock (&_diskfs_control_lock); + _diskfs_ncontrol_ports++; + spin_lock (&_diskfs_control_lock); + *control = ports_get_right (ports_allocate_port + (sizeof (struct port_info), PT_CTL)); *controltype = MACH_MSG_TYPE_MAKE_SEND; } |