From 9ddc4f2a1717455e50eb6fd010cda4e5f4080c42 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Mon, 31 Oct 2016 19:18:41 +0100 Subject: libdiskfs: Factorize code for last hard reference being released * libdiskfs/node-lastref.c: New file * libdiskfs/Makefile (OTHERSRCS): Add node-lastref.c * libdiskfs/libdiskfs/node-nput.c (diskfs_nput): Replace last hard reference code with a call to _diskfs_lastref. * libdiskfs/node-nrele.c (diskfs_nrele): Likewise. --- libdiskfs/priv.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libdiskfs/priv.h') diff --git a/libdiskfs/priv.h b/libdiskfs/priv.h index 2ac3c9ef..276d0931 100644 --- a/libdiskfs/priv.h +++ b/libdiskfs/priv.h @@ -96,6 +96,10 @@ void _diskfs_boot_privports (void); /* Clean routine for control port. */ void _diskfs_control_clean (void *); +/* Called when the last hard reference is released. If there are no + links, then request soft references to be dropped. */ +void _diskfs_lastref (struct node *np); + /* Number of outstanding PT_CTL ports. */ extern int _diskfs_ncontrol_ports; -- cgit v1.2.3