summaryrefslogtreecommitdiffstats
path: root/cpukit/libfs/src/imfs/imfs_rename.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2012-02-21 17:24:10 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2012-03-13 12:24:15 +0100
commit2e0ce55bf04861e9f80bf51621286b9a1a2c5af1 (patch)
treefc89dd3972bbf496d1575c0d996feaea342780aa /cpukit/libfs/src/imfs/imfs_rename.c
parentIMFS: Lock the file system during directory reads (diff)
downloadrtems-2e0ce55bf04861e9f80bf51621286b9a1a2c5af1.tar.bz2
IMFS: Use unprotected chain operations
Directory entry add or removal operations are protected by the file system instance lock. There is no need for protected chain operations.
Diffstat (limited to '')
-rw-r--r--cpukit/libfs/src/imfs/imfs_rename.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/cpukit/libfs/src/imfs/imfs_rename.c b/cpukit/libfs/src/imfs/imfs_rename.c
index 855d026c36..57d1957be7 100644
--- a/cpukit/libfs/src/imfs/imfs_rename.c
+++ b/cpukit/libfs/src/imfs/imfs_rename.c
@@ -42,14 +42,8 @@ int IMFS_rename(
memcpy( node->name, name, namelen );
node->name [namelen] = '\0';
- rtems_chain_extract( &node->Node );
-
- node->Parent = new_parent;
- rtems_chain_append(
- &new_parent->info.directory.Entries,
- &node->Node
- );
-
+ IMFS_remove_from_directory( node );
+ IMFS_add_to_directory( new_parent, node );
IMFS_update_ctime( node );
} else {
errno = ENAMETOOLONG;