summaryrefslogtreecommitdiff
path: root/libdiskfs/peropen-make.c
AgeCommit message (Collapse)Author
2014-08-31libdiskfs: fix reference counting of peropen objectsJustus Winter
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.
2014-05-26libdiskfs: lock-less reference counting for peropen objectsJustus Winter
* 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.
2013-09-21Fix ENOMEM handling in *_make_peropenSamuel Thibault
* 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.
2013-09-15libdiskfs: track file name in struct peropenJustus Winter
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-262002-03-25 Neal H Walfield <neal@cs.uml.edu>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.
2001-04-012001-03-28 Neal H Walfield <neal@cs.uml.edu>Roland McGrath
* dir-chg.c (diskfs_S_dir_notice_changes): Check what malloc returns. * peropen-make.c (diskfs_make_peropen): Likewise.
1999-02-13Sat Feb 13 04:29:29 1999 Thomas Bushnell, BSG <tb@mit.edu>Thomas Bushnell
* 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.
1997-06-25(diskfs_make_peropen):Miles Bader
Initialize the ROOT_PARENT, SHADOW_ROOT, and SHADOW_ROOT_PARENT fields.
1997-02-14(diskfs_make_peropen):Miles Bader
Add & use CONTEXT param. Remove DOTDOT & DEPTH params.
1997-02-06(diskfs_make_peropen):Miles Bader
Add & use DEPTH argument.
1994-07-20entered into RCSMichael I. Bushnell
1994-07-19Formerly peropen-make.c.~8~Michael I. Bushnell
1994-07-13Formerly peropen-make.c.~7~Michael I. Bushnell
1994-03-03Formerly peropen-make.c.~6~Michael I. Bushnell
1994-02-17Formerly peropen-make.c.~5~Michael I. Bushnell
1994-02-17Formerly peropen-make.c.~4~Michael I. Bushnell
1994-02-08Formerly peropen-make.c.~3~Michael I. Bushnell
1994-02-07Formerly peropen-make.c.~2~Michael I. Bushnell
1994-02-02Initial revisionMichael I. Bushnell