diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 1999-10-12 19:10:46 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 1999-10-12 19:10:46 +0000 |
commit | dd0f32614ceb0dd72f406d8434acdecc5ccff616 (patch) | |
tree | 3620ac014837a178fc91eac4b54b7b2e5ceb5c41 /c/src/exec/libcsupport/src/unmount.c | |
parent | Fixed spacing. (diff) | |
download | rtems-dd0f32614ceb0dd72f406d8434acdecc5ccff616.tar.bz2 |
Added rtems_filesystem_freenode() macro and added calls at appropriate
places to make sure memory allocated for filesystem specifif nodes
gets freed.
Diffstat (limited to 'c/src/exec/libcsupport/src/unmount.c')
-rw-r--r-- | c/src/exec/libcsupport/src/unmount.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/c/src/exec/libcsupport/src/unmount.c b/c/src/exec/libcsupport/src/unmount.c index b32d9b0caa..50827fc804 100644 --- a/c/src/exec/libcsupport/src/unmount.c +++ b/c/src/exec/libcsupport/src/unmount.c @@ -84,8 +84,7 @@ int unmount( */ 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 ); } @@ -96,8 +95,7 @@ int unmount( */ 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 ); } @@ -110,8 +108,7 @@ int unmount( */ 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; } @@ -120,9 +117,8 @@ int unmount( */ 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; } /* @@ -142,8 +138,7 @@ int unmount( */ free( temp_loc.mt_entry ); - if ( temp_loc.ops->freenod ) - (*temp_loc.ops->freenod)( &temp_loc ); + rtems_filesystem_freenode( &temp_loc ); return result; |