diff options
author | Miles Bader <miles@gnu.org> | 1996-01-27 16:49:50 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 1996-01-27 16:49:50 +0000 |
commit | df12c601cd8ddd0f60e5cabbef52cd48d5c22dc9 (patch) | |
tree | e385e9e1cddc2051a8dee4a686b285b611e30338 /libdiskfs/file-getcontrol.c | |
parent | f841438e951fca51fa926795e551a45ae60c3a63 (diff) |
(diskfs_S_file_getcontrol):
Use ports_create_port instead of ports_allocate_port.
Diffstat (limited to 'libdiskfs/file-getcontrol.c')
-rw-r--r-- | libdiskfs/file-getcontrol.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/libdiskfs/file-getcontrol.c b/libdiskfs/file-getcontrol.c index 27225e31..e510a271 100644 --- a/libdiskfs/file-getcontrol.c +++ b/libdiskfs/file-getcontrol.c @@ -1,5 +1,5 @@ /* libdiskfs implementation of fs.defs:file_getcontrol.c - Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation + Copyright (C) 1992, 1993, 1994, 1995, 1996 Free Software Foundation This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as @@ -34,15 +34,17 @@ diskfs_S_file_getcontrol (struct protid *cred, error = EPERM; else { - spin_lock (&_diskfs_control_lock); - _diskfs_ncontrol_ports++; - spin_unlock (&_diskfs_control_lock); - newpi = ports_allocate_port (diskfs_port_bucket, - sizeof (struct port_info), - diskfs_control_class); - *control = ports_get_right (newpi); - *controltype = MACH_MSG_TYPE_MAKE_SEND; - ports_port_deref (newpi); + error = ports_create_port (diskfs_control_class, diskfs_port_bucket, + sizeof (struct port_info), &newpi); + if (! error) + { + spin_lock (&_diskfs_control_lock); + _diskfs_ncontrol_ports++; + spin_unlock (&_diskfs_control_lock); + *control = ports_get_right (newpi); + *controltype = MACH_MSG_TYPE_MAKE_SEND; + ports_port_deref (newpi); + } } return error; |