summaryrefslogtreecommitdiffstats
path: root/cpukit/libcsupport/src/freenode.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/libcsupport/src/freenode.c')
-rw-r--r--cpukit/libcsupport/src/freenode.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/cpukit/libcsupport/src/freenode.c b/cpukit/libcsupport/src/freenode.c
index 21a9c1de91..cc05b6034a 100644
--- a/cpukit/libcsupport/src/freenode.c
+++ b/cpukit/libcsupport/src/freenode.c
@@ -4,6 +4,9 @@
* COPYRIGHT (c) 1989-2010.
* On-Line Applications Research Corporation (OAR).
*
+ * Modifications to support reference counting in the file system are
+ * Copyright (c) 2012 embedded brains GmbH.
+ *
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.com/license/LICENSE.
@@ -11,10 +14,16 @@
* $Id$
*/
-#include <stdlib.h>
+#if HAVE_CONFIG_H
+ #include "config.h"
+#endif
+
#include <rtems/libio_.h>
-void rtems_filesystem_freenode( rtems_filesystem_location_info_t *_node )
+void rtems_filesystem_location_free( rtems_filesystem_location_info_t *loc )
{
- _node->ops->freenod_h(_node );
+ rtems_filesystem_instance_lock( loc );
+ (*loc->ops->freenod_h)( loc );
+ rtems_filesystem_instance_unlock( loc );
+ rtems_filesystem_location_remove_from_mt_entry( loc );
}