aboutsummaryrefslogtreecommitdiff
path: root/libdiskfs/peropen-make.c
Commit message (Collapse)AuthorAgeFilesLines
* libdiskfs: fix reference counting of peropen objectsJustus Winter2014-08-311-1/+1
| | | | | | | | | | | | | | | | | | | Previously, peropen objects were created with a reference count of zero. Therefore, if diskfs_create_protid fails, passing such an object to diskfs_release_peropen would lead to a reference count underflow. * libdiskfs/peropen-make.c (diskfs_peropen_make): Initialize reference count to one. * libdiskfs/protid-make.c (diskfs_start_protid): And consume this reference on success. Update comment. (diskfs_create_protid): Update comment. * libdiskfs/diskfs.h: Update comments. * libdiskfs/io-duplicate.c (diskfs_S_io_duplicate): Adjust reference counting accordingly. * libdiskfs/io-reauthenticate.c (diskfs_S_io_reauthenticate): Likewise. * libdiskfs/io-restrict-auth.c (diskfs_S_io_restrict_auth): Likewise. * doc/hurd.texi (Diskfs Internals): Update accordingly.
* libdiskfs: lock-less reference counting for peropen objectsJustus Winter2014-05-261-1/+1
| | | | | | | | | * libdiskfs/diskfs.h (struct peropen): Use refcount_t for field refcnt. * libdiskfs/peropen-make.c (diskfs_make_peropen): Initialize refcnt. * libdiskfs/peropen-rele.c (diskfs_release_peropen): Adjust accordingly. * libdiskfs/protid-make.c (diskfs_start_protid): Likewise. Also, the node must no longer be locked, adjust comment accordingly. (diskfs_create_protid): Likewise.
* Fix ENOMEM handling in *_make_peropenSamuel Thibault2013-09-211-7/+7
| | | | | | | * libdiskfs/peropen-make.c (diskfs_make_peropen): Move `strdup` before port reference modifications, to fix abortion. * libnetfs/make-peropen.c (netfs_make_peropen): Check for `malloc` failure. Move `strdup` before port reference modifications, to fix abortion.
* libdiskfs: track file name in struct peropenJustus Winter2013-09-151-0/+8
| | | | | | | | | | | Track the relative path used to obtain a file handle in the struct peropen. * libdiskfs/diskfs.h (struct peropen): New field path. * libdiskfs/peropen-make.c (diskfs_make_peropen): Initialize path. * libdiskfs/peropen-rele.c (diskfs_release_peropen): Free path. * libdiskfs/fsys-getroot.c (diskfs_S_fsys_getroot): Initialize path. * libdiskfs/dir-lookup.c (diskfs_S_dir_lookup): Preserve the path.
* 2002-03-25 Neal H Walfield <neal@cs.uml.edu>Neal H. Walfield2002-03-261-6/+7
| | | | | | | | | | | | | | | | | | | | | | * 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.
* 2001-03-28 Neal H Walfield <neal@cs.uml.edu>Roland McGrath2001-04-011-1/+4
| | | | | | * dir-chg.c (diskfs_S_dir_notice_changes): Check what malloc returns. * peropen-make.c (diskfs_make_peropen): Likewise.
* Sat Feb 13 04:29:29 1999 Thomas Bushnell, BSG <tb@mit.edu>Thomas Bushnell1999-02-131-2/+2
| | | | | | * peropen-make.c (diskfs_make_peropen): If there is no existing context, then set the shadow_root iff we are a chrooted virtual root filesystem.
* (diskfs_make_peropen):Miles Bader1997-06-251-0/+6
| | | | Initialize the ROOT_PARENT, SHADOW_ROOT, and SHADOW_ROOT_PARENT fields.
* (diskfs_make_peropen):Miles Bader1997-02-141-7/+21
| | | | | Add & use CONTEXT param. Remove DOTDOT & DEPTH params.
* (diskfs_make_peropen):Miles Bader1997-02-061-2/+4
| | | | Add & use DEPTH argument.
* entered into RCSMichael I. Bushnell1994-07-201-2/+1
|
* Formerly peropen-make.c.~8~Michael I. Bushnell1994-07-191-1/+2
|
* Formerly peropen-make.c.~7~Michael I. Bushnell1994-07-131-1/+5
|
* Formerly peropen-make.c.~6~Michael I. Bushnell1994-03-031-0/+1
|
* Formerly peropen-make.c.~5~Michael I. Bushnell1994-02-171-1/+1
|
* Formerly peropen-make.c.~4~Michael I. Bushnell1994-02-171-2/+1
|
* Formerly peropen-make.c.~3~Michael I. Bushnell1994-02-081-0/+1
|
* Formerly peropen-make.c.~2~Michael I. Bushnell1994-02-071-1/+1
|
* Initial revisionMichael I. Bushnell1994-02-021-0/+33