diff options
author | Miles Bader <miles@gnu.org> | 1995-07-29 15:36:32 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 1995-07-29 15:36:32 +0000 |
commit | 97f597cbc98999b529e7378cbdef6644167262f2 (patch) | |
tree | ca50dfa4dbb09ec15495d709402068ff75b55bcb /libdiskfs | |
parent | a74389b711fba055f8be56d9dc09886046e8f622 (diff) |
(diskfs_drop_node): Don't actually drop the node if it is a socket naming
point, unless it also has no links.
Diffstat (limited to 'libdiskfs')
-rw-r--r-- | libdiskfs/node-drop.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libdiskfs/node-drop.c b/libdiskfs/node-drop.c index 663c47a9..ef3285ec 100644 --- a/libdiskfs/node-drop.c +++ b/libdiskfs/node-drop.c @@ -61,6 +61,16 @@ diskfs_drop_node (struct node *np) diskfs_node_update (np, 1); diskfs_free_node (np, savemode); } + else if (np->sockaddr) + /* If NP is a socket naming point, we can't drop it until it actually + gets unlinked. Unfortunately we have no way of knowing whether the + server is still alive. This will result in a node with zero refs; I'm + not sure whether that will cause lossage.... XXX */ + { + spin_unlock (&diskfs_node_refcnt_lock); + mutex_unlock (&np->lock); + return; + } else diskfs_node_update (np, diskfs_synchronous); |