From 1bdff036acddbbc63aa849741abba6581549f7b6 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Thu, 23 Feb 2012 17:57:27 +0100 Subject: IMFS: Reference counting for nodes The introduction of reference counting of nodes avoids the removal of open nodes and potential usage of freed memory. --- cpukit/libfs/src/imfs/memfile.c | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'cpukit/libfs/src/imfs/memfile.c') diff --git a/cpukit/libfs/src/imfs/memfile.c b/cpukit/libfs/src/imfs/memfile.c index 65810c0bca..fed8914235 100644 --- a/cpukit/libfs/src/imfs/memfile.c +++ b/cpukit/libfs/src/imfs/memfile.c @@ -113,28 +113,6 @@ int memfile_open( return 0; } -/* - * memfile_close - * - * This routine processes the close() system call. Note that there is - * nothing to flush or memory to free at this point. - */ -int memfile_close( - rtems_libio_t *iop -) -{ - IMFS_jnode_t *the_jnode; - - the_jnode = iop->pathinfo.node_access; - - if (iop->flags & LIBIO_FLAGS_APPEND) - iop->offset = the_jnode->info.file.size; - - IMFS_check_node_remove( the_jnode ); - - return 0; -} - /* * memfile_read * -- cgit v1.2.3