[rtems commit] dosfs: Use unprotected chain operations

Sebastian Huber sebh at rtems.org
Wed Aug 21 12:56:48 UTC 2013


Module:    rtems
Branch:    master
Commit:    389ffb280f84edb26cbab10de5a3c205648a047b
Changeset: http://git.rtems.org/rtems/commit/?id=389ffb280f84edb26cbab10de5a3c205648a047b

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Wed Aug 21 14:58:26 2013 +0200

dosfs: Use unprotected chain operations

This area is protected by the FAT file system instance lock.

---

 cpukit/libfs/src/dosfs/fat.c      |    4 ++--
 cpukit/libfs/src/dosfs/fat_file.c |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/cpukit/libfs/src/dosfs/fat.c b/cpukit/libfs/src/dosfs/fat.c
index 5225b95..f81bc7b 100644
--- a/cpukit/libfs/src/dosfs/fat.c
+++ b/cpukit/libfs/src/dosfs/fat.c
@@ -855,7 +855,7 @@ fat_shutdown_drive(fat_fs_info_t *fs_info)
         rtems_chain_node    *node = NULL;
         rtems_chain_control *the_chain = fs_info->vhash + i;
 
-        while ( (node = rtems_chain_get(the_chain)) != NULL )
+        while ( (node = rtems_chain_get_unprotected(the_chain)) != NULL )
             free(node);
     }
 
@@ -864,7 +864,7 @@ fat_shutdown_drive(fat_fs_info_t *fs_info)
         rtems_chain_node    *node = NULL;
         rtems_chain_control *the_chain = fs_info->rhash + i;
 
-        while ( (node = rtems_chain_get(the_chain)) != NULL )
+        while ( (node = rtems_chain_get_unprotected(the_chain)) != NULL )
             free(node);
     }
 
diff --git a/cpukit/libfs/src/dosfs/fat_file.c b/cpukit/libfs/src/dosfs/fat_file.c
index 4425b85..2899f1b 100644
--- a/cpukit/libfs/src/dosfs/fat_file.c
+++ b/cpukit/libfs/src/dosfs/fat_file.c
@@ -920,7 +920,7 @@ static inline void
 _hash_insert(rtems_chain_control *hash, uint32_t   key1, uint32_t   key2,
              fat_file_fd_t *el)
 {
-    rtems_chain_append((hash) + ((key1) % FAT_HASH_MODULE), &(el)->link);
+    rtems_chain_append_unprotected((hash) + ((key1) % FAT_HASH_MODULE), &(el)->link);
 }
 
 
@@ -940,7 +940,7 @@ static inline void
 _hash_delete(rtems_chain_control *hash, uint32_t   key1, uint32_t   key2,
              fat_file_fd_t *el)
 {
-    rtems_chain_extract(&(el)->link);
+    rtems_chain_extract_unprotected(&(el)->link);
 }
 
 /* _hash_search --




More information about the vc mailing list