diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2012-02-21 17:24:10 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2012-03-13 12:24:15 +0100 |
commit | 2e0ce55bf04861e9f80bf51621286b9a1a2c5af1 (patch) | |
tree | fc89dd3972bbf496d1575c0d996feaea342780aa /cpukit/libfs/src/imfs/imfs_rename.c | |
parent | IMFS: Lock the file system during directory reads (diff) | |
download | rtems-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.c | 10 |
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; |