Index: c/src/exec/include/rtems/libio_.h
===================================================================
--- c/src/exec/include/rtems/libio_.h	(revision e2116f900313354f7a2011b20aeaac813910921f)
+++ c/src/exec/include/rtems/libio_.h	(revision dd0f32614ceb0dd72f406d8434acdecc5ccff616)
@@ -159,4 +159,16 @@
             return -1;                                \
       }                                               \
+  } while (0)
+
+/*
+ *  rtems_filesystem_freenode
+ *
+ *  Macro to free a node.
+ */
+
+#define rtems_filesystem_freenode( _node ) \
+  do { \
+    if ( (_node)->ops->freenod ) \
+      (*(_node)->ops->freenod)( (_node) ); \
   } while (0)
 
Index: c/src/exec/libcsupport/include/rtems/libio_.h
===================================================================
--- c/src/exec/libcsupport/include/rtems/libio_.h	(revision e2116f900313354f7a2011b20aeaac813910921f)
+++ c/src/exec/libcsupport/include/rtems/libio_.h	(revision dd0f32614ceb0dd72f406d8434acdecc5ccff616)
@@ -159,4 +159,16 @@
             return -1;                                \
       }                                               \
+  } while (0)
+
+/*
+ *  rtems_filesystem_freenode
+ *
+ *  Macro to free a node.
+ */
+
+#define rtems_filesystem_freenode( _node ) \
+  do { \
+    if ( (_node)->ops->freenod ) \
+      (*(_node)->ops->freenod)( (_node) ); \
   } while (0)
 
Index: c/src/exec/libcsupport/src/chdir.c
===================================================================
--- c/src/exec/libcsupport/src/chdir.c	(revision e2116f900313354f7a2011b20aeaac813910921f)
+++ c/src/exec/libcsupport/src/chdir.c	(revision dd0f32614ceb0dd72f406d8434acdecc5ccff616)
@@ -40,17 +40,14 @@
 
   if ( !loc.ops->node_type ) {
-    if ( loc.ops->freenod )
-      (*loc.ops->freenod)( &loc );
+    rtems_filesystem_freenode( &loc );
     set_errno_and_return_minus_one( ENOTSUP );
   }
 
   if (  (*loc.ops->node_type)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
-    if ( loc.ops->freenod )
-      (*loc.ops->freenod)( &loc );
+    rtems_filesystem_freenode( &loc );
     set_errno_and_return_minus_one( ENOTDIR );
   }
   
-  if ( rtems_filesystem_current.ops->freenod )
-    (*rtems_filesystem_current.ops->freenod)( &rtems_filesystem_current );
+  rtems_filesystem_freenode( &rtems_filesystem_current );
    
   rtems_filesystem_current = loc;
Index: c/src/exec/libcsupport/src/chmod.c
===================================================================
--- c/src/exec/libcsupport/src/chmod.c	(revision e2116f900313354f7a2011b20aeaac813910921f)
+++ c/src/exec/libcsupport/src/chmod.c	(revision dd0f32614ceb0dd72f406d8434acdecc5ccff616)
@@ -36,6 +36,5 @@
   
   if ( !loc.handlers->fchmod ){
-    if ( loc.ops->freenod )
-      (*loc.ops->freenod)( &loc );
+    rtems_filesystem_freenode( &loc );
     set_errno_and_return_minus_one( ENOTSUP );
   }
@@ -43,6 +42,5 @@
   result = (*loc.handlers->fchmod)( &loc, mode );
 
-  if ( loc.ops->freenod )
-    (*loc.ops->freenod)( &loc );
+  rtems_filesystem_freenode( &loc );
   
   return result;
Index: c/src/exec/libcsupport/src/chown.c
===================================================================
--- c/src/exec/libcsupport/src/chown.c	(revision e2116f900313354f7a2011b20aeaac813910921f)
+++ c/src/exec/libcsupport/src/chown.c	(revision dd0f32614ceb0dd72f406d8434acdecc5ccff616)
@@ -34,6 +34,5 @@
   
   if ( !loc.ops->chown ) {
-    if ( loc.ops->freenod )
-      (*loc.ops->freenod)( &loc );
+    rtems_filesystem_freenode( &loc );
     set_errno_and_return_minus_one( ENOTSUP );
   }
@@ -41,6 +40,5 @@
   result = (*loc.ops->chown)( &loc, owner, group );
 
-  if ( loc.ops->freenod )
-    (*loc.ops->freenod)( &loc );
+  rtems_filesystem_freenode( &loc );
   
   return result;
Index: c/src/exec/libcsupport/src/link.c
===================================================================
--- c/src/exec/libcsupport/src/link.c	(revision e2116f900313354f7a2011b20aeaac813910921f)
+++ c/src/exec/libcsupport/src/link.c	(revision dd0f32614ceb0dd72f406d8434acdecc5ccff616)
@@ -45,6 +45,5 @@
   result = (*parent_loc.ops->evalformake)( &new[i], &parent_loc, &name_start );
   if ( result != 0 ) {
-    if ( existing_loc.ops->freenod )
-      (*existing_loc.ops->freenod)( &parent_loc );
+    rtems_filesystem_freenode( &parent_loc );
     set_errno_and_return_minus_one( result );
   }
@@ -56,21 +55,12 @@
 
   if ( parent_loc.mt_entry != existing_loc.mt_entry ) {
-    if ( existing_loc.ops->freenod )
-      (*existing_loc.ops->freenod)( &existing_loc );
-
-    if ( parent_loc.ops->freenod )
-      (*parent_loc.ops->freenod)( &parent_loc );
-
+    rtems_filesystem_freenode( &existing_loc );
+    rtems_filesystem_freenode( &parent_loc );
     set_errno_and_return_minus_one( EXDEV );
   }
 
   if ( !parent_loc.ops->link ) {
-
-    if ( existing_loc.ops->freenod )
-      (*existing_loc.ops->freenod)( &existing_loc );
-
-    if ( parent_loc.ops->freenod )
-      (*parent_loc.ops->freenod)( &parent_loc );
-
+    rtems_filesystem_freenode( &existing_loc );
+    rtems_filesystem_freenode( &parent_loc );
     set_errno_and_return_minus_one( ENOTSUP );
   }
@@ -78,9 +68,6 @@
   result = (*parent_loc.ops->link)( &existing_loc, &parent_loc, name_start );
   
-  if ( existing_loc.ops->freenod )
-    (*existing_loc.ops->freenod)( &existing_loc );
-
-  if ( parent_loc.ops->freenod )
-    (*parent_loc.ops->freenod)( &parent_loc );
+  rtems_filesystem_freenode( &existing_loc );
+  rtems_filesystem_freenode( &parent_loc );
 
   return result;
Index: c/src/exec/libcsupport/src/mknod.c
===================================================================
--- c/src/exec/libcsupport/src/mknod.c	(revision e2116f900313354f7a2011b20aeaac813910921f)
+++ c/src/exec/libcsupport/src/mknod.c	(revision dd0f32614ceb0dd72f406d8434acdecc5ccff616)
@@ -54,12 +54,11 @@
 
   if ( !temp_loc.ops->mknod ) {
-    if ( temp_loc.ops->freenod )
-      (*temp_loc.ops->freenod)( &temp_loc );
+    rtems_filesystem_freenode( &temp_loc );
     set_errno_and_return_minus_one( ENOTSUP );
   }
 
   result =  (*temp_loc.ops->mknod)( name_start, mode, dev, &temp_loc );
-  if ( temp_loc.ops->freenod )
-    (*temp_loc.ops->freenod)( &temp_loc );
+
+  rtems_filesystem_freenode( &temp_loc );
 
   return result;
Index: c/src/exec/libcsupport/src/mount.c
===================================================================
--- c/src/exec/libcsupport/src/mount.c	(revision e2116f900313354f7a2011b20aeaac813910921f)
+++ c/src/exec/libcsupport/src/mount.c	(revision dd0f32614ceb0dd72f406d8434acdecc5ccff616)
@@ -225,6 +225,5 @@
   *mt_entry = temp_mt_entry;
 
-  if ( loc.ops->freenod )
-    (*loc.ops->freenod)( &loc );
+  rtems_filesystem_freenode( &loc );
   
   return 0;
@@ -234,6 +233,5 @@
   free( temp_mt_entry );
 
-  if ( loc.ops->freenod )
-    (*loc.ops->freenod)( &loc );
+  rtems_filesystem_freenode( &loc );
   
   return -1;
Index: c/src/exec/libcsupport/src/open.c
===================================================================
--- c/src/exec/libcsupport/src/open.c	(revision e2116f900313354f7a2011b20aeaac813910921f)
+++ c/src/exec/libcsupport/src/open.c	(revision dd0f32614ceb0dd72f406d8434acdecc5ccff616)
@@ -180,7 +180,6 @@
   }
 
-  if ( loc.ops->freenod )
-    (*loc.ops->freenod)( &loc );
-    
+  rtems_filesystem_freenode( &loc );
+
   return iop - rtems_libio_iops;
 }
Index: c/src/exec/libcsupport/src/readlink.c
===================================================================
--- c/src/exec/libcsupport/src/readlink.c	(revision e2116f900313354f7a2011b20aeaac813910921f)
+++ c/src/exec/libcsupport/src/readlink.c	(revision dd0f32614ceb0dd72f406d8434acdecc5ccff616)
@@ -32,18 +32,15 @@
   
   if ( !loc.ops->node_type ){
-    if ( loc.ops->freenod )
-      (*loc.ops->freenod)( &loc );
+    rtems_filesystem_freenode( &loc );
     set_errno_and_return_minus_one( ENOTSUP );
   }
 
   if (  (*loc.ops->node_type)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){
-    if ( loc.ops->freenod )
-      (*loc.ops->freenod)( &loc );
+    rtems_filesystem_freenode( &loc );
     set_errno_and_return_minus_one( EINVAL );
   }
 
   if ( !loc.ops->readlink ){
-    if ( loc.ops->freenod )
-      (*loc.ops->freenod)( &loc );
+    rtems_filesystem_freenode( &loc );
     set_errno_and_return_minus_one( ENOTSUP );
   }
@@ -51,6 +48,5 @@
   result =  (*loc.ops->readlink)( &loc, buf, bufsize );
 
-  if ( loc.ops->freenod )
-    (*loc.ops->freenod)( &loc );
+  rtems_filesystem_freenode( &loc );
   
   return result;
Index: c/src/exec/libcsupport/src/rmdir.c
===================================================================
--- c/src/exec/libcsupport/src/rmdir.c	(revision e2116f900313354f7a2011b20aeaac813910921f)
+++ c/src/exec/libcsupport/src/rmdir.c	(revision dd0f32614ceb0dd72f406d8434acdecc5ccff616)
@@ -41,12 +41,10 @@
 
   if ( !loc.ops->node_type ){
-    if ( loc.ops->freenod )
-      (*loc.ops->freenod)( &loc );
+    rtems_filesystem_freenode( &loc );
     set_errno_and_return_minus_one( ENOTSUP );
   }
 
   if (  (*loc.ops->node_type)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){
-    if ( loc.ops->freenod )
-      (*loc.ops->freenod)( &loc );
+    rtems_filesystem_freenode( &loc );
     set_errno_and_return_minus_one( ENOTDIR );
   }
@@ -57,6 +55,5 @@
 
   if ( !loc.ops->rmnod ){
-    if ( loc.ops->freenod )
-      (*loc.ops->freenod)( &loc );
+    rtems_filesystem_freenode( &loc );
     set_errno_and_return_minus_one( ENOTSUP );
   }
@@ -64,6 +61,5 @@
   result =  (*loc.ops->rmnod)( &loc );  
 
-  if ( loc.ops->freenod )
-    (*loc.ops->freenod)( &loc );
+  rtems_filesystem_freenode( &loc );
   
   return result;
Index: c/src/exec/libcsupport/src/stat.c
===================================================================
--- c/src/exec/libcsupport/src/stat.c	(revision e2116f900313354f7a2011b20aeaac813910921f)
+++ c/src/exec/libcsupport/src/stat.c	(revision dd0f32614ceb0dd72f406d8434acdecc5ccff616)
@@ -60,6 +60,5 @@
   
   if ( !loc.handlers->fstat ){
-    if ( loc.ops->freenod )
-      (*loc.ops->freenod)( &loc );
+    rtems_filesystem_freenode( &loc );
     set_errno_and_return_minus_one( ENOTSUP );
   }
@@ -74,6 +73,5 @@
   status =  (*loc.handlers->fstat)( &loc, buf );
 
-  if ( loc.ops->freenod )
-    (*loc.ops->freenod)( &loc );
+  rtems_filesystem_freenode( &loc );
   
   return status;
Index: c/src/exec/libcsupport/src/symlink.c
===================================================================
--- c/src/exec/libcsupport/src/symlink.c	(revision e2116f900313354f7a2011b20aeaac813910921f)
+++ c/src/exec/libcsupport/src/symlink.c	(revision dd0f32614ceb0dd72f406d8434acdecc5ccff616)
@@ -32,6 +32,5 @@
   result = (*loc.ops->symlink)( &loc, actualpath, name_start);
 
-  if ( loc.ops->freenod )
-    (*loc.ops->freenod)( &loc );
+  rtems_filesystem_freenode( &loc );
 
   return result;
Index: c/src/exec/libcsupport/src/unlink.c
===================================================================
--- c/src/exec/libcsupport/src/unlink.c	(revision e2116f900313354f7a2011b20aeaac813910921f)
+++ c/src/exec/libcsupport/src/unlink.c	(revision dd0f32614ceb0dd72f406d8434acdecc5ccff616)
@@ -33,18 +33,15 @@
   
   if ( !loc.ops->node_type ) {
-    if ( loc.ops->freenod )
-      (*loc.ops->freenod)( &loc );
+    rtems_filesystem_freenode( &loc );
     set_errno_and_return_minus_one( ENOTSUP );
   }
 
   if (  (*loc.ops->node_type)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) {
-    if ( loc.ops->freenod )
-      (*loc.ops->freenod)( &loc );
+    rtems_filesystem_freenode( &loc );
     set_errno_and_return_minus_one( EISDIR );
   }
 
   if ( !loc.ops->unlink ) {
-    if ( loc.ops->freenod )
-      (*loc.ops->freenod)( &loc );
+    rtems_filesystem_freenode( &loc );
     set_errno_and_return_minus_one( ENOTSUP );
   }
@@ -52,6 +49,5 @@
   result = (*loc.ops->unlink)( &loc );
 
-  if ( loc.ops->freenod )
-    (*loc.ops->freenod)( &loc );
+  rtems_filesystem_freenode( &loc );
   
   return result;
Index: c/src/exec/libcsupport/src/unmount.c
===================================================================
--- c/src/exec/libcsupport/src/unmount.c	(revision e2116f900313354f7a2011b20aeaac813910921f)
+++ c/src/exec/libcsupport/src/unmount.c	(revision dd0f32614ceb0dd72f406d8434acdecc5ccff616)
@@ -85,6 +85,5 @@
 
   if ( rtems_filesystem_current.mt_entry == temp_loc.mt_entry ) {
-    if ( temp_loc.ops->freenod )
-      (*temp_loc.ops->freenod)( &temp_loc );
+    rtems_filesystem_freenode( &temp_loc );
     set_errno_and_return_minus_one( EBUSY );
   }
@@ -97,6 +96,5 @@
 
   if ( rtems_libio_is_open_files_in_fs( temp_loc.mt_entry ) == 1 ) {
-    if ( temp_loc.ops->freenod )
-      (*temp_loc.ops->freenod)( &temp_loc );
+    rtems_filesystem_freenode( &temp_loc );
     set_errno_and_return_minus_one( EBUSY );
   }
@@ -111,6 +109,5 @@
 
   if ((temp_mt_entry.mt_point_node.ops->unmount )( temp_loc.mt_entry ) != 0 ) {
-    if ( temp_loc.ops->freenod )
-      (*temp_loc.ops->freenod)( &temp_loc );
+    rtems_filesystem_freenode( &temp_loc );
     return -1;
   }
@@ -121,7 +118,6 @@
 
   if ((temp_mt_entry.mt_fs_root.ops->fsunmount_me )( temp_loc.mt_entry ) != 0){
-    if ( temp_loc.ops->freenod )
-      (*temp_loc.ops->freenod)( &temp_loc );
-     return -1;
+    rtems_filesystem_freenode( &temp_loc );
+    return -1;
   }
 
@@ -143,6 +139,5 @@
 
   free( temp_loc.mt_entry );
-  if ( temp_loc.ops->freenod )
-    (*temp_loc.ops->freenod)( &temp_loc );
+  rtems_filesystem_freenode( &temp_loc );
 
   return result;
Index: c/src/exec/libcsupport/src/utime.c
===================================================================
--- c/src/exec/libcsupport/src/utime.c	(revision e2116f900313354f7a2011b20aeaac813910921f)
+++ c/src/exec/libcsupport/src/utime.c	(revision dd0f32614ceb0dd72f406d8434acdecc5ccff616)
@@ -35,6 +35,5 @@
   result = (*temp_loc.ops->utime)( &temp_loc, times->actime, times->modtime );
 
-  if ( temp_loc.ops->freenod )
-    (*temp_loc.ops->freenod)( &temp_loc );
+  rtems_filesystem_freenode( &temp_loc );
 
   return result;
Index: c/src/exec/libfs/src/imfs/ioman.c
===================================================================
--- c/src/exec/libfs/src/imfs/ioman.c	(revision e2116f900313354f7a2011b20aeaac813910921f)
+++ c/src/exec/libfs/src/imfs/ioman.c	(revision dd0f32614ceb0dd72f406d8434acdecc5ccff616)
@@ -86,6 +86,5 @@
   if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) {
     *device_info = 0;
-    if ( loc.ops->freenod )
-      (*loc.ops->freenod)( &loc );
+    rtems_filesystem_freenode( &loc );
     return RTEMS_UNSATISFIED;
   }
@@ -97,6 +96,5 @@
   *device_info              = &device;
 
-  if ( loc.ops->freenod )
-    (*loc.ops->freenod)( &loc );
+  rtems_filesystem_freenode( &loc );
    
 #endif
Index: c/src/lib/include/rtems/libio_.h
===================================================================
--- c/src/lib/include/rtems/libio_.h	(revision e2116f900313354f7a2011b20aeaac813910921f)
+++ c/src/lib/include/rtems/libio_.h	(revision dd0f32614ceb0dd72f406d8434acdecc5ccff616)
@@ -159,4 +159,16 @@
             return -1;                                \
       }                                               \
+  } while (0)
+
+/*
+ *  rtems_filesystem_freenode
+ *
+ *  Macro to free a node.
+ */
+
+#define rtems_filesystem_freenode( _node ) \
+  do { \
+    if ( (_node)->ops->freenod ) \
+      (*(_node)->ops->freenod)( (_node) ); \
   } while (0)
 
Index: c/src/lib/libc/chdir.c
===================================================================
--- c/src/lib/libc/chdir.c	(revision e2116f900313354f7a2011b20aeaac813910921f)
+++ c/src/lib/libc/chdir.c	(revision dd0f32614ceb0dd72f406d8434acdecc5ccff616)
@@ -40,17 +40,14 @@
 
   if ( !loc.ops->node_type ) {
-    if ( loc.ops->freenod )
-      (*loc.ops->freenod)( &loc );
+    rtems_filesystem_freenode( &loc );
     set_errno_and_return_minus_one( ENOTSUP );
   }
 
   if (  (*loc.ops->node_type)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
-    if ( loc.ops->freenod )
-      (*loc.ops->freenod)( &loc );
+    rtems_filesystem_freenode( &loc );
     set_errno_and_return_minus_one( ENOTDIR );
   }
   
-  if ( rtems_filesystem_current.ops->freenod )
-    (*rtems_filesystem_current.ops->freenod)( &rtems_filesystem_current );
+  rtems_filesystem_freenode( &rtems_filesystem_current );
    
   rtems_filesystem_current = loc;
Index: c/src/lib/libc/chmod.c
===================================================================
--- c/src/lib/libc/chmod.c	(revision e2116f900313354f7a2011b20aeaac813910921f)
+++ c/src/lib/libc/chmod.c	(revision dd0f32614ceb0dd72f406d8434acdecc5ccff616)
@@ -36,6 +36,5 @@
   
   if ( !loc.handlers->fchmod ){
-    if ( loc.ops->freenod )
-      (*loc.ops->freenod)( &loc );
+    rtems_filesystem_freenode( &loc );
     set_errno_and_return_minus_one( ENOTSUP );
   }
@@ -43,6 +42,5 @@
   result = (*loc.handlers->fchmod)( &loc, mode );
 
-  if ( loc.ops->freenod )
-    (*loc.ops->freenod)( &loc );
+  rtems_filesystem_freenode( &loc );
   
   return result;
Index: c/src/lib/libc/chown.c
===================================================================
--- c/src/lib/libc/chown.c	(revision e2116f900313354f7a2011b20aeaac813910921f)
+++ c/src/lib/libc/chown.c	(revision dd0f32614ceb0dd72f406d8434acdecc5ccff616)
@@ -34,6 +34,5 @@
   
   if ( !loc.ops->chown ) {
-    if ( loc.ops->freenod )
-      (*loc.ops->freenod)( &loc );
+    rtems_filesystem_freenode( &loc );
     set_errno_and_return_minus_one( ENOTSUP );
   }
@@ -41,6 +40,5 @@
   result = (*loc.ops->chown)( &loc, owner, group );
 
-  if ( loc.ops->freenod )
-    (*loc.ops->freenod)( &loc );
+  rtems_filesystem_freenode( &loc );
   
   return result;
Index: c/src/lib/libc/ioman.c
===================================================================
--- c/src/lib/libc/ioman.c	(revision e2116f900313354f7a2011b20aeaac813910921f)
+++ c/src/lib/libc/ioman.c	(revision dd0f32614ceb0dd72f406d8434acdecc5ccff616)
@@ -86,6 +86,5 @@
   if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) {
     *device_info = 0;
-    if ( loc.ops->freenod )
-      (*loc.ops->freenod)( &loc );
+    rtems_filesystem_freenode( &loc );
     return RTEMS_UNSATISFIED;
   }
@@ -97,6 +96,5 @@
   *device_info              = &device;
 
-  if ( loc.ops->freenod )
-    (*loc.ops->freenod)( &loc );
+  rtems_filesystem_freenode( &loc );
    
 #endif
Index: c/src/lib/libc/libio_.h
===================================================================
--- c/src/lib/libc/libio_.h	(revision e2116f900313354f7a2011b20aeaac813910921f)
+++ c/src/lib/libc/libio_.h	(revision dd0f32614ceb0dd72f406d8434acdecc5ccff616)
@@ -159,4 +159,16 @@
             return -1;                                \
       }                                               \
+  } while (0)
+
+/*
+ *  rtems_filesystem_freenode
+ *
+ *  Macro to free a node.
+ */
+
+#define rtems_filesystem_freenode( _node ) \
+  do { \
+    if ( (_node)->ops->freenod ) \
+      (*(_node)->ops->freenod)( (_node) ); \
   } while (0)
 
Index: c/src/lib/libc/link.c
===================================================================
--- c/src/lib/libc/link.c	(revision e2116f900313354f7a2011b20aeaac813910921f)
+++ c/src/lib/libc/link.c	(revision dd0f32614ceb0dd72f406d8434acdecc5ccff616)
@@ -45,6 +45,5 @@
   result = (*parent_loc.ops->evalformake)( &new[i], &parent_loc, &name_start );
   if ( result != 0 ) {
-    if ( existing_loc.ops->freenod )
-      (*existing_loc.ops->freenod)( &parent_loc );
+    rtems_filesystem_freenode( &parent_loc );
     set_errno_and_return_minus_one( result );
   }
@@ -56,21 +55,12 @@
 
   if ( parent_loc.mt_entry != existing_loc.mt_entry ) {
-    if ( existing_loc.ops->freenod )
-      (*existing_loc.ops->freenod)( &existing_loc );
-
-    if ( parent_loc.ops->freenod )
-      (*parent_loc.ops->freenod)( &parent_loc );
-
+    rtems_filesystem_freenode( &existing_loc );
+    rtems_filesystem_freenode( &parent_loc );
     set_errno_and_return_minus_one( EXDEV );
   }
 
   if ( !parent_loc.ops->link ) {
-
-    if ( existing_loc.ops->freenod )
-      (*existing_loc.ops->freenod)( &existing_loc );
-
-    if ( parent_loc.ops->freenod )
-      (*parent_loc.ops->freenod)( &parent_loc );
-
+    rtems_filesystem_freenode( &existing_loc );
+    rtems_filesystem_freenode( &parent_loc );
     set_errno_and_return_minus_one( ENOTSUP );
   }
@@ -78,9 +68,6 @@
   result = (*parent_loc.ops->link)( &existing_loc, &parent_loc, name_start );
   
-  if ( existing_loc.ops->freenod )
-    (*existing_loc.ops->freenod)( &existing_loc );
-
-  if ( parent_loc.ops->freenod )
-    (*parent_loc.ops->freenod)( &parent_loc );
+  rtems_filesystem_freenode( &existing_loc );
+  rtems_filesystem_freenode( &parent_loc );
 
   return result;
Index: c/src/lib/libc/mknod.c
===================================================================
--- c/src/lib/libc/mknod.c	(revision e2116f900313354f7a2011b20aeaac813910921f)
+++ c/src/lib/libc/mknod.c	(revision dd0f32614ceb0dd72f406d8434acdecc5ccff616)
@@ -54,12 +54,11 @@
 
   if ( !temp_loc.ops->mknod ) {
-    if ( temp_loc.ops->freenod )
-      (*temp_loc.ops->freenod)( &temp_loc );
+    rtems_filesystem_freenode( &temp_loc );
     set_errno_and_return_minus_one( ENOTSUP );
   }
 
   result =  (*temp_loc.ops->mknod)( name_start, mode, dev, &temp_loc );
-  if ( temp_loc.ops->freenod )
-    (*temp_loc.ops->freenod)( &temp_loc );
+
+  rtems_filesystem_freenode( &temp_loc );
 
   return result;
Index: c/src/lib/libc/mount.c
===================================================================
--- c/src/lib/libc/mount.c	(revision e2116f900313354f7a2011b20aeaac813910921f)
+++ c/src/lib/libc/mount.c	(revision dd0f32614ceb0dd72f406d8434acdecc5ccff616)
@@ -225,6 +225,5 @@
   *mt_entry = temp_mt_entry;
 
-  if ( loc.ops->freenod )
-    (*loc.ops->freenod)( &loc );
+  rtems_filesystem_freenode( &loc );
   
   return 0;
@@ -234,6 +233,5 @@
   free( temp_mt_entry );
 
-  if ( loc.ops->freenod )
-    (*loc.ops->freenod)( &loc );
+  rtems_filesystem_freenode( &loc );
   
   return -1;
Index: c/src/lib/libc/open.c
===================================================================
--- c/src/lib/libc/open.c	(revision e2116f900313354f7a2011b20aeaac813910921f)
+++ c/src/lib/libc/open.c	(revision dd0f32614ceb0dd72f406d8434acdecc5ccff616)
@@ -180,7 +180,6 @@
   }
 
-  if ( loc.ops->freenod )
-    (*loc.ops->freenod)( &loc );
-    
+  rtems_filesystem_freenode( &loc );
+
   return iop - rtems_libio_iops;
 }
Index: c/src/lib/libc/readlink.c
===================================================================
--- c/src/lib/libc/readlink.c	(revision e2116f900313354f7a2011b20aeaac813910921f)
+++ c/src/lib/libc/readlink.c	(revision dd0f32614ceb0dd72f406d8434acdecc5ccff616)
@@ -32,18 +32,15 @@
   
   if ( !loc.ops->node_type ){
-    if ( loc.ops->freenod )
-      (*loc.ops->freenod)( &loc );
+    rtems_filesystem_freenode( &loc );
     set_errno_and_return_minus_one( ENOTSUP );
   }
 
   if (  (*loc.ops->node_type)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){
-    if ( loc.ops->freenod )
-      (*loc.ops->freenod)( &loc );
+    rtems_filesystem_freenode( &loc );
     set_errno_and_return_minus_one( EINVAL );
   }
 
   if ( !loc.ops->readlink ){
-    if ( loc.ops->freenod )
-      (*loc.ops->freenod)( &loc );
+    rtems_filesystem_freenode( &loc );
     set_errno_and_return_minus_one( ENOTSUP );
   }
@@ -51,6 +48,5 @@
   result =  (*loc.ops->readlink)( &loc, buf, bufsize );
 
-  if ( loc.ops->freenod )
-    (*loc.ops->freenod)( &loc );
+  rtems_filesystem_freenode( &loc );
   
   return result;
Index: c/src/lib/libc/rmdir.c
===================================================================
--- c/src/lib/libc/rmdir.c	(revision e2116f900313354f7a2011b20aeaac813910921f)
+++ c/src/lib/libc/rmdir.c	(revision dd0f32614ceb0dd72f406d8434acdecc5ccff616)
@@ -41,12 +41,10 @@
 
   if ( !loc.ops->node_type ){
-    if ( loc.ops->freenod )
-      (*loc.ops->freenod)( &loc );
+    rtems_filesystem_freenode( &loc );
     set_errno_and_return_minus_one( ENOTSUP );
   }
 
   if (  (*loc.ops->node_type)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){
-    if ( loc.ops->freenod )
-      (*loc.ops->freenod)( &loc );
+    rtems_filesystem_freenode( &loc );
     set_errno_and_return_minus_one( ENOTDIR );
   }
@@ -57,6 +55,5 @@
 
   if ( !loc.ops->rmnod ){
-    if ( loc.ops->freenod )
-      (*loc.ops->freenod)( &loc );
+    rtems_filesystem_freenode( &loc );
     set_errno_and_return_minus_one( ENOTSUP );
   }
@@ -64,6 +61,5 @@
   result =  (*loc.ops->rmnod)( &loc );  
 
-  if ( loc.ops->freenod )
-    (*loc.ops->freenod)( &loc );
+  rtems_filesystem_freenode( &loc );
   
   return result;
Index: c/src/lib/libc/stat.c
===================================================================
--- c/src/lib/libc/stat.c	(revision e2116f900313354f7a2011b20aeaac813910921f)
+++ c/src/lib/libc/stat.c	(revision dd0f32614ceb0dd72f406d8434acdecc5ccff616)
@@ -60,6 +60,5 @@
   
   if ( !loc.handlers->fstat ){
-    if ( loc.ops->freenod )
-      (*loc.ops->freenod)( &loc );
+    rtems_filesystem_freenode( &loc );
     set_errno_and_return_minus_one( ENOTSUP );
   }
@@ -74,6 +73,5 @@
   status =  (*loc.handlers->fstat)( &loc, buf );
 
-  if ( loc.ops->freenod )
-    (*loc.ops->freenod)( &loc );
+  rtems_filesystem_freenode( &loc );
   
   return status;
Index: c/src/lib/libc/symlink.c
===================================================================
--- c/src/lib/libc/symlink.c	(revision e2116f900313354f7a2011b20aeaac813910921f)
+++ c/src/lib/libc/symlink.c	(revision dd0f32614ceb0dd72f406d8434acdecc5ccff616)
@@ -32,6 +32,5 @@
   result = (*loc.ops->symlink)( &loc, actualpath, name_start);
 
-  if ( loc.ops->freenod )
-    (*loc.ops->freenod)( &loc );
+  rtems_filesystem_freenode( &loc );
 
   return result;
Index: c/src/lib/libc/unlink.c
===================================================================
--- c/src/lib/libc/unlink.c	(revision e2116f900313354f7a2011b20aeaac813910921f)
+++ c/src/lib/libc/unlink.c	(revision dd0f32614ceb0dd72f406d8434acdecc5ccff616)
@@ -33,18 +33,15 @@
   
   if ( !loc.ops->node_type ) {
-    if ( loc.ops->freenod )
-      (*loc.ops->freenod)( &loc );
+    rtems_filesystem_freenode( &loc );
     set_errno_and_return_minus_one( ENOTSUP );
   }
 
   if (  (*loc.ops->node_type)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) {
-    if ( loc.ops->freenod )
-      (*loc.ops->freenod)( &loc );
+    rtems_filesystem_freenode( &loc );
     set_errno_and_return_minus_one( EISDIR );
   }
 
   if ( !loc.ops->unlink ) {
-    if ( loc.ops->freenod )
-      (*loc.ops->freenod)( &loc );
+    rtems_filesystem_freenode( &loc );
     set_errno_and_return_minus_one( ENOTSUP );
   }
@@ -52,6 +49,5 @@
   result = (*loc.ops->unlink)( &loc );
 
-  if ( loc.ops->freenod )
-    (*loc.ops->freenod)( &loc );
+  rtems_filesystem_freenode( &loc );
   
   return result;
Index: c/src/lib/libc/unmount.c
===================================================================
--- c/src/lib/libc/unmount.c	(revision e2116f900313354f7a2011b20aeaac813910921f)
+++ c/src/lib/libc/unmount.c	(revision dd0f32614ceb0dd72f406d8434acdecc5ccff616)
@@ -85,6 +85,5 @@
 
   if ( rtems_filesystem_current.mt_entry == temp_loc.mt_entry ) {
-    if ( temp_loc.ops->freenod )
-      (*temp_loc.ops->freenod)( &temp_loc );
+    rtems_filesystem_freenode( &temp_loc );
     set_errno_and_return_minus_one( EBUSY );
   }
@@ -97,6 +96,5 @@
 
   if ( rtems_libio_is_open_files_in_fs( temp_loc.mt_entry ) == 1 ) {
-    if ( temp_loc.ops->freenod )
-      (*temp_loc.ops->freenod)( &temp_loc );
+    rtems_filesystem_freenode( &temp_loc );
     set_errno_and_return_minus_one( EBUSY );
   }
@@ -111,6 +109,5 @@
 
   if ((temp_mt_entry.mt_point_node.ops->unmount )( temp_loc.mt_entry ) != 0 ) {
-    if ( temp_loc.ops->freenod )
-      (*temp_loc.ops->freenod)( &temp_loc );
+    rtems_filesystem_freenode( &temp_loc );
     return -1;
   }
@@ -121,7 +118,6 @@
 
   if ((temp_mt_entry.mt_fs_root.ops->fsunmount_me )( temp_loc.mt_entry ) != 0){
-    if ( temp_loc.ops->freenod )
-      (*temp_loc.ops->freenod)( &temp_loc );
-     return -1;
+    rtems_filesystem_freenode( &temp_loc );
+    return -1;
   }
 
@@ -143,6 +139,5 @@
 
   free( temp_loc.mt_entry );
-  if ( temp_loc.ops->freenod )
-    (*temp_loc.ops->freenod)( &temp_loc );
+  rtems_filesystem_freenode( &temp_loc );
 
   return result;
Index: c/src/lib/libc/utime.c
===================================================================
--- c/src/lib/libc/utime.c	(revision e2116f900313354f7a2011b20aeaac813910921f)
+++ c/src/lib/libc/utime.c	(revision dd0f32614ceb0dd72f406d8434acdecc5ccff616)
@@ -35,6 +35,5 @@
   result = (*temp_loc.ops->utime)( &temp_loc, times->actime, times->modtime );
 
-  if ( temp_loc.ops->freenod )
-    (*temp_loc.ops->freenod)( &temp_loc );
+  rtems_filesystem_freenode( &temp_loc );
 
   return result;
Index: c/src/libfs/src/imfs/ioman.c
===================================================================
--- c/src/libfs/src/imfs/ioman.c	(revision e2116f900313354f7a2011b20aeaac813910921f)
+++ c/src/libfs/src/imfs/ioman.c	(revision dd0f32614ceb0dd72f406d8434acdecc5ccff616)
@@ -86,6 +86,5 @@
   if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) {
     *device_info = 0;
-    if ( loc.ops->freenod )
-      (*loc.ops->freenod)( &loc );
+    rtems_filesystem_freenode( &loc );
     return RTEMS_UNSATISFIED;
   }
@@ -97,6 +96,5 @@
   *device_info              = &device;
 
-  if ( loc.ops->freenod )
-    (*loc.ops->freenod)( &loc );
+  rtems_filesystem_freenode( &loc );
    
 #endif
Index: cpukit/include/rtems/libio_.h
===================================================================
--- cpukit/include/rtems/libio_.h	(revision e2116f900313354f7a2011b20aeaac813910921f)
+++ cpukit/include/rtems/libio_.h	(revision dd0f32614ceb0dd72f406d8434acdecc5ccff616)
@@ -159,4 +159,16 @@
             return -1;                                \
       }                                               \
+  } while (0)
+
+/*
+ *  rtems_filesystem_freenode
+ *
+ *  Macro to free a node.
+ */
+
+#define rtems_filesystem_freenode( _node ) \
+  do { \
+    if ( (_node)->ops->freenod ) \
+      (*(_node)->ops->freenod)( (_node) ); \
   } while (0)
 
Index: cpukit/libcsupport/include/rtems/libio_.h
===================================================================
--- cpukit/libcsupport/include/rtems/libio_.h	(revision e2116f900313354f7a2011b20aeaac813910921f)
+++ cpukit/libcsupport/include/rtems/libio_.h	(revision dd0f32614ceb0dd72f406d8434acdecc5ccff616)
@@ -159,4 +159,16 @@
             return -1;                                \
       }                                               \
+  } while (0)
+
+/*
+ *  rtems_filesystem_freenode
+ *
+ *  Macro to free a node.
+ */
+
+#define rtems_filesystem_freenode( _node ) \
+  do { \
+    if ( (_node)->ops->freenod ) \
+      (*(_node)->ops->freenod)( (_node) ); \
   } while (0)
 
Index: cpukit/libcsupport/src/chdir.c
===================================================================
--- cpukit/libcsupport/src/chdir.c	(revision e2116f900313354f7a2011b20aeaac813910921f)
+++ cpukit/libcsupport/src/chdir.c	(revision dd0f32614ceb0dd72f406d8434acdecc5ccff616)
@@ -40,17 +40,14 @@
 
   if ( !loc.ops->node_type ) {
-    if ( loc.ops->freenod )
-      (*loc.ops->freenod)( &loc );
+    rtems_filesystem_freenode( &loc );
     set_errno_and_return_minus_one( ENOTSUP );
   }
 
   if (  (*loc.ops->node_type)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
-    if ( loc.ops->freenod )
-      (*loc.ops->freenod)( &loc );
+    rtems_filesystem_freenode( &loc );
     set_errno_and_return_minus_one( ENOTDIR );
   }
   
-  if ( rtems_filesystem_current.ops->freenod )
-    (*rtems_filesystem_current.ops->freenod)( &rtems_filesystem_current );
+  rtems_filesystem_freenode( &rtems_filesystem_current );
    
   rtems_filesystem_current = loc;
Index: cpukit/libcsupport/src/chmod.c
===================================================================
--- cpukit/libcsupport/src/chmod.c	(revision e2116f900313354f7a2011b20aeaac813910921f)
+++ cpukit/libcsupport/src/chmod.c	(revision dd0f32614ceb0dd72f406d8434acdecc5ccff616)
@@ -36,6 +36,5 @@
   
   if ( !loc.handlers->fchmod ){
-    if ( loc.ops->freenod )
-      (*loc.ops->freenod)( &loc );
+    rtems_filesystem_freenode( &loc );
     set_errno_and_return_minus_one( ENOTSUP );
   }
@@ -43,6 +42,5 @@
   result = (*loc.handlers->fchmod)( &loc, mode );
 
-  if ( loc.ops->freenod )
-    (*loc.ops->freenod)( &loc );
+  rtems_filesystem_freenode( &loc );
   
   return result;
Index: cpukit/libcsupport/src/chown.c
===================================================================
--- cpukit/libcsupport/src/chown.c	(revision e2116f900313354f7a2011b20aeaac813910921f)
+++ cpukit/libcsupport/src/chown.c	(revision dd0f32614ceb0dd72f406d8434acdecc5ccff616)
@@ -34,6 +34,5 @@
   
   if ( !loc.ops->chown ) {
-    if ( loc.ops->freenod )
-      (*loc.ops->freenod)( &loc );
+    rtems_filesystem_freenode( &loc );
     set_errno_and_return_minus_one( ENOTSUP );
   }
@@ -41,6 +40,5 @@
   result = (*loc.ops->chown)( &loc, owner, group );
 
-  if ( loc.ops->freenod )
-    (*loc.ops->freenod)( &loc );
+  rtems_filesystem_freenode( &loc );
   
   return result;
Index: cpukit/libcsupport/src/link.c
===================================================================
--- cpukit/libcsupport/src/link.c	(revision e2116f900313354f7a2011b20aeaac813910921f)
+++ cpukit/libcsupport/src/link.c	(revision dd0f32614ceb0dd72f406d8434acdecc5ccff616)
@@ -45,6 +45,5 @@
   result = (*parent_loc.ops->evalformake)( &new[i], &parent_loc, &name_start );
   if ( result != 0 ) {
-    if ( existing_loc.ops->freenod )
-      (*existing_loc.ops->freenod)( &parent_loc );
+    rtems_filesystem_freenode( &parent_loc );
     set_errno_and_return_minus_one( result );
   }
@@ -56,21 +55,12 @@
 
   if ( parent_loc.mt_entry != existing_loc.mt_entry ) {
-    if ( existing_loc.ops->freenod )
-      (*existing_loc.ops->freenod)( &existing_loc );
-
-    if ( parent_loc.ops->freenod )
-      (*parent_loc.ops->freenod)( &parent_loc );
-
+    rtems_filesystem_freenode( &existing_loc );
+    rtems_filesystem_freenode( &parent_loc );
     set_errno_and_return_minus_one( EXDEV );
   }
 
   if ( !parent_loc.ops->link ) {
-
-    if ( existing_loc.ops->freenod )
-      (*existing_loc.ops->freenod)( &existing_loc );
-
-    if ( parent_loc.ops->freenod )
-      (*parent_loc.ops->freenod)( &parent_loc );
-
+    rtems_filesystem_freenode( &existing_loc );
+    rtems_filesystem_freenode( &parent_loc );
     set_errno_and_return_minus_one( ENOTSUP );
   }
@@ -78,9 +68,6 @@
   result = (*parent_loc.ops->link)( &existing_loc, &parent_loc, name_start );
   
-  if ( existing_loc.ops->freenod )
-    (*existing_loc.ops->freenod)( &existing_loc );
-
-  if ( parent_loc.ops->freenod )
-    (*parent_loc.ops->freenod)( &parent_loc );
+  rtems_filesystem_freenode( &existing_loc );
+  rtems_filesystem_freenode( &parent_loc );
 
   return result;
Index: cpukit/libcsupport/src/mknod.c
===================================================================
--- cpukit/libcsupport/src/mknod.c	(revision e2116f900313354f7a2011b20aeaac813910921f)
+++ cpukit/libcsupport/src/mknod.c	(revision dd0f32614ceb0dd72f406d8434acdecc5ccff616)
@@ -54,12 +54,11 @@
 
   if ( !temp_loc.ops->mknod ) {
-    if ( temp_loc.ops->freenod )
-      (*temp_loc.ops->freenod)( &temp_loc );
+    rtems_filesystem_freenode( &temp_loc );
     set_errno_and_return_minus_one( ENOTSUP );
   }
 
   result =  (*temp_loc.ops->mknod)( name_start, mode, dev, &temp_loc );
-  if ( temp_loc.ops->freenod )
-    (*temp_loc.ops->freenod)( &temp_loc );
+
+  rtems_filesystem_freenode( &temp_loc );
 
   return result;
Index: cpukit/libcsupport/src/mount.c
===================================================================
--- cpukit/libcsupport/src/mount.c	(revision e2116f900313354f7a2011b20aeaac813910921f)
+++ cpukit/libcsupport/src/mount.c	(revision dd0f32614ceb0dd72f406d8434acdecc5ccff616)
@@ -225,6 +225,5 @@
   *mt_entry = temp_mt_entry;
 
-  if ( loc.ops->freenod )
-    (*loc.ops->freenod)( &loc );
+  rtems_filesystem_freenode( &loc );
   
   return 0;
@@ -234,6 +233,5 @@
   free( temp_mt_entry );
 
-  if ( loc.ops->freenod )
-    (*loc.ops->freenod)( &loc );
+  rtems_filesystem_freenode( &loc );
   
   return -1;
Index: cpukit/libcsupport/src/open.c
===================================================================
--- cpukit/libcsupport/src/open.c	(revision e2116f900313354f7a2011b20aeaac813910921f)
+++ cpukit/libcsupport/src/open.c	(revision dd0f32614ceb0dd72f406d8434acdecc5ccff616)
@@ -180,7 +180,6 @@
   }
 
-  if ( loc.ops->freenod )
-    (*loc.ops->freenod)( &loc );
-    
+  rtems_filesystem_freenode( &loc );
+
   return iop - rtems_libio_iops;
 }
Index: cpukit/libcsupport/src/readlink.c
===================================================================
--- cpukit/libcsupport/src/readlink.c	(revision e2116f900313354f7a2011b20aeaac813910921f)
+++ cpukit/libcsupport/src/readlink.c	(revision dd0f32614ceb0dd72f406d8434acdecc5ccff616)
@@ -32,18 +32,15 @@
   
   if ( !loc.ops->node_type ){
-    if ( loc.ops->freenod )
-      (*loc.ops->freenod)( &loc );
+    rtems_filesystem_freenode( &loc );
     set_errno_and_return_minus_one( ENOTSUP );
   }
 
   if (  (*loc.ops->node_type)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){
-    if ( loc.ops->freenod )
-      (*loc.ops->freenod)( &loc );
+    rtems_filesystem_freenode( &loc );
     set_errno_and_return_minus_one( EINVAL );
   }
 
   if ( !loc.ops->readlink ){
-    if ( loc.ops->freenod )
-      (*loc.ops->freenod)( &loc );
+    rtems_filesystem_freenode( &loc );
     set_errno_and_return_minus_one( ENOTSUP );
   }
@@ -51,6 +48,5 @@
   result =  (*loc.ops->readlink)( &loc, buf, bufsize );
 
-  if ( loc.ops->freenod )
-    (*loc.ops->freenod)( &loc );
+  rtems_filesystem_freenode( &loc );
   
   return result;
Index: cpukit/libcsupport/src/rmdir.c
===================================================================
--- cpukit/libcsupport/src/rmdir.c	(revision e2116f900313354f7a2011b20aeaac813910921f)
+++ cpukit/libcsupport/src/rmdir.c	(revision dd0f32614ceb0dd72f406d8434acdecc5ccff616)
@@ -41,12 +41,10 @@
 
   if ( !loc.ops->node_type ){
-    if ( loc.ops->freenod )
-      (*loc.ops->freenod)( &loc );
+    rtems_filesystem_freenode( &loc );
     set_errno_and_return_minus_one( ENOTSUP );
   }
 
   if (  (*loc.ops->node_type)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){
-    if ( loc.ops->freenod )
-      (*loc.ops->freenod)( &loc );
+    rtems_filesystem_freenode( &loc );
     set_errno_and_return_minus_one( ENOTDIR );
   }
@@ -57,6 +55,5 @@
 
   if ( !loc.ops->rmnod ){
-    if ( loc.ops->freenod )
-      (*loc.ops->freenod)( &loc );
+    rtems_filesystem_freenode( &loc );
     set_errno_and_return_minus_one( ENOTSUP );
   }
@@ -64,6 +61,5 @@
   result =  (*loc.ops->rmnod)( &loc );  
 
-  if ( loc.ops->freenod )
-    (*loc.ops->freenod)( &loc );
+  rtems_filesystem_freenode( &loc );
   
   return result;
Index: cpukit/libcsupport/src/stat.c
===================================================================
--- cpukit/libcsupport/src/stat.c	(revision e2116f900313354f7a2011b20aeaac813910921f)
+++ cpukit/libcsupport/src/stat.c	(revision dd0f32614ceb0dd72f406d8434acdecc5ccff616)
@@ -60,6 +60,5 @@
   
   if ( !loc.handlers->fstat ){
-    if ( loc.ops->freenod )
-      (*loc.ops->freenod)( &loc );
+    rtems_filesystem_freenode( &loc );
     set_errno_and_return_minus_one( ENOTSUP );
   }
@@ -74,6 +73,5 @@
   status =  (*loc.handlers->fstat)( &loc, buf );
 
-  if ( loc.ops->freenod )
-    (*loc.ops->freenod)( &loc );
+  rtems_filesystem_freenode( &loc );
   
   return status;
Index: cpukit/libcsupport/src/symlink.c
===================================================================
--- cpukit/libcsupport/src/symlink.c	(revision e2116f900313354f7a2011b20aeaac813910921f)
+++ cpukit/libcsupport/src/symlink.c	(revision dd0f32614ceb0dd72f406d8434acdecc5ccff616)
@@ -32,6 +32,5 @@
   result = (*loc.ops->symlink)( &loc, actualpath, name_start);
 
-  if ( loc.ops->freenod )
-    (*loc.ops->freenod)( &loc );
+  rtems_filesystem_freenode( &loc );
 
   return result;
Index: cpukit/libcsupport/src/unlink.c
===================================================================
--- cpukit/libcsupport/src/unlink.c	(revision e2116f900313354f7a2011b20aeaac813910921f)
+++ cpukit/libcsupport/src/unlink.c	(revision dd0f32614ceb0dd72f406d8434acdecc5ccff616)
@@ -33,18 +33,15 @@
   
   if ( !loc.ops->node_type ) {
-    if ( loc.ops->freenod )
-      (*loc.ops->freenod)( &loc );
+    rtems_filesystem_freenode( &loc );
     set_errno_and_return_minus_one( ENOTSUP );
   }
 
   if (  (*loc.ops->node_type)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) {
-    if ( loc.ops->freenod )
-      (*loc.ops->freenod)( &loc );
+    rtems_filesystem_freenode( &loc );
     set_errno_and_return_minus_one( EISDIR );
   }
 
   if ( !loc.ops->unlink ) {
-    if ( loc.ops->freenod )
-      (*loc.ops->freenod)( &loc );
+    rtems_filesystem_freenode( &loc );
     set_errno_and_return_minus_one( ENOTSUP );
   }
@@ -52,6 +49,5 @@
   result = (*loc.ops->unlink)( &loc );
 
-  if ( loc.ops->freenod )
-    (*loc.ops->freenod)( &loc );
+  rtems_filesystem_freenode( &loc );
   
   return result;
Index: cpukit/libcsupport/src/unmount.c
===================================================================
--- cpukit/libcsupport/src/unmount.c	(revision e2116f900313354f7a2011b20aeaac813910921f)
+++ cpukit/libcsupport/src/unmount.c	(revision dd0f32614ceb0dd72f406d8434acdecc5ccff616)
@@ -85,6 +85,5 @@
 
   if ( rtems_filesystem_current.mt_entry == temp_loc.mt_entry ) {
-    if ( temp_loc.ops->freenod )
-      (*temp_loc.ops->freenod)( &temp_loc );
+    rtems_filesystem_freenode( &temp_loc );
     set_errno_and_return_minus_one( EBUSY );
   }
@@ -97,6 +96,5 @@
 
   if ( rtems_libio_is_open_files_in_fs( temp_loc.mt_entry ) == 1 ) {
-    if ( temp_loc.ops->freenod )
-      (*temp_loc.ops->freenod)( &temp_loc );
+    rtems_filesystem_freenode( &temp_loc );
     set_errno_and_return_minus_one( EBUSY );
   }
@@ -111,6 +109,5 @@
 
   if ((temp_mt_entry.mt_point_node.ops->unmount )( temp_loc.mt_entry ) != 0 ) {
-    if ( temp_loc.ops->freenod )
-      (*temp_loc.ops->freenod)( &temp_loc );
+    rtems_filesystem_freenode( &temp_loc );
     return -1;
   }
@@ -121,7 +118,6 @@
 
   if ((temp_mt_entry.mt_fs_root.ops->fsunmount_me )( temp_loc.mt_entry ) != 0){
-    if ( temp_loc.ops->freenod )
-      (*temp_loc.ops->freenod)( &temp_loc );
-     return -1;
+    rtems_filesystem_freenode( &temp_loc );
+    return -1;
   }
 
@@ -143,6 +139,5 @@
 
   free( temp_loc.mt_entry );
-  if ( temp_loc.ops->freenod )
-    (*temp_loc.ops->freenod)( &temp_loc );
+  rtems_filesystem_freenode( &temp_loc );
 
   return result;
Index: cpukit/libcsupport/src/utime.c
===================================================================
--- cpukit/libcsupport/src/utime.c	(revision e2116f900313354f7a2011b20aeaac813910921f)
+++ cpukit/libcsupport/src/utime.c	(revision dd0f32614ceb0dd72f406d8434acdecc5ccff616)
@@ -35,6 +35,5 @@
   result = (*temp_loc.ops->utime)( &temp_loc, times->actime, times->modtime );
 
-  if ( temp_loc.ops->freenod )
-    (*temp_loc.ops->freenod)( &temp_loc );
+  rtems_filesystem_freenode( &temp_loc );
 
   return result;
Index: cpukit/libfs/src/imfs/ioman.c
===================================================================
--- cpukit/libfs/src/imfs/ioman.c	(revision e2116f900313354f7a2011b20aeaac813910921f)
+++ cpukit/libfs/src/imfs/ioman.c	(revision dd0f32614ceb0dd72f406d8434acdecc5ccff616)
@@ -86,6 +86,5 @@
   if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) {
     *device_info = 0;
-    if ( loc.ops->freenod )
-      (*loc.ops->freenod)( &loc );
+    rtems_filesystem_freenode( &loc );
     return RTEMS_UNSATISFIED;
   }
@@ -97,6 +96,5 @@
   *device_info              = &device;
 
-  if ( loc.ops->freenod )
-    (*loc.ops->freenod)( &loc );
+  rtems_filesystem_freenode( &loc );
    
 #endif
