From 22702db6dab56e36c86d91fbf5f2f469fad99f2c Mon Sep 17 00:00:00 2001 From: "Neal H. Walfield" Date: Tue, 26 Mar 2002 14:59:52 +0000 Subject: 2002-03-25 Neal H Walfield * peropen-make.c (diskfs_make_peropen): Instead of returning the peropen, return as error_t and return the peropen in the new parameter *PPO. * diskfs.h (diskfs_make_peropen): Change declaration to reflect new semantics. * boot-start.c (diskfs_start_bootstrap): Check the return value of diskfs_make_peropen using the new semantics. (diskfs_S_exec_startup_get_info): Likewise. (diskfs_execboot_fsys_startup): Likewise. (diskfs_S_fsys_init): Likewise. * dir-lookup.c (diskfs_S_dir_lookup): Likewise. * dir-mkfile.c (diskfs_S_dir_mkfile): Likewise. * file-exec.c (diskfs_S_file_exec): Likewise. * file-reparent.c (diskfs_S_file_reparent): Likewise. * fsys-getfile.c (diskfs_S_fsys_getfile): Likewise. * fsys-getroot.c (diskfs_S_fsys_getroot): Likewise. * trans-callback.c (_diskfs_translator_callback2_fn): Likewise. * init-startup.c (diskfs_startup_diskfs): Likewise. --- libdiskfs/fsys-getfile.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'libdiskfs/fsys-getfile.c') diff --git a/libdiskfs/fsys-getfile.c b/libdiskfs/fsys-getfile.c index efa0cdf0..2fe9495e 100644 --- a/libdiskfs/fsys-getfile.c +++ b/libdiskfs/fsys-getfile.c @@ -1,6 +1,6 @@ /* Return the file for a given handle (for nfs server support) - Copyright (C) 1997,99,2001 Free Software Foundation, Inc. + Copyright (C) 1997,99,2001,02 Free Software Foundation, Inc. This file is part of the GNU Hurd. @@ -39,6 +39,7 @@ diskfs_S_fsys_getfile (mach_port_t fsys, struct node *node; const union diskfs_fhandle *f; struct protid *new_cred; + struct peropen *new_po; struct iouser *user; struct port_info *pt = ports_lookup_port (diskfs_port_bucket, fsys, diskfs_control_class); @@ -86,8 +87,13 @@ diskfs_S_fsys_getfile (mach_port_t fsys, && ! diskfs_check_readonly ()) flags |= O_WRITE; - err = diskfs_create_protid (diskfs_make_peropen (node, flags, 0), - user, &new_cred); + err = diskfs_make_peropen (node, flags, 0, &new_po); + if (! err) + { + err = diskfs_create_protid (new_po, user, &new_cred); + if (err) + diskfs_release_peropen (new_po); + } iohelp_free_iouser (user); -- cgit v1.2.3