[rtems commit] IMFS: Fix reference count for debug enabled
Sebastian Huber
sebh at rtems.org
Fri Jun 21 08:23:25 UTC 2013
Module: rtems
Branch: master
Commit: 9165a5b07d569d23443c286e5a2b2a26148a6526
Changeset: http://git.rtems.org/rtems/commit/?id=9165a5b07d569d23443c286e5a2b2a26148a6526
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Tue Jun 18 14:14:43 2013 +0200
IMFS: Fix reference count for debug enabled
---
cpukit/libfs/src/imfs/imfs_initsupp.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/cpukit/libfs/src/imfs/imfs_initsupp.c b/cpukit/libfs/src/imfs/imfs_initsupp.c
index a68fff1..12826f7 100644
--- a/cpukit/libfs/src/imfs/imfs_initsupp.c
+++ b/cpukit/libfs/src/imfs/imfs_initsupp.c
@@ -130,10 +130,10 @@ void IMFS_node_free( const rtems_filesystem_location_info_t *loc )
{
IMFS_jnode_t *node = loc->node_access;
- if ( node->reference_count == 1 ) {
+ --node->reference_count;
+
+ if ( node->reference_count == 0 ) {
IMFS_node_destroy( node );
- } else {
- --node->reference_count;
}
}
More information about the vc
mailing list