summaryrefslogtreecommitdiffstats
path: root/cpukit/libfs/src/rfs/rtems-rfs-inode.c
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2014-04-25 17:30:37 +1000
committerChris Johns <chrisj@rtems.org>2014-04-25 17:30:37 +1000
commit5d2ae6e2dddc047cbc3873813b45d0eaa2d072a1 (patch)
treee9c40fdeeea0d7f247800164d3a7dee84a22c162 /cpukit/libfs/src/rfs/rtems-rfs-inode.c
parentrtems: Account for file system semaphores. (diff)
downloadrtems-5d2ae6e2dddc047cbc3873813b45d0eaa2d072a1.tar.bz2
libfs/rfs: Fix the fstime failures for the RFS file system.
Diffstat (limited to '')
-rw-r--r--cpukit/libfs/src/rfs/rtems-rfs-inode.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/cpukit/libfs/src/rfs/rtems-rfs-inode.c b/cpukit/libfs/src/rfs/rtems-rfs-inode.c
index ceac98f2b5..718120f2ac 100644
--- a/cpukit/libfs/src/rfs/rtems-rfs-inode.c
+++ b/cpukit/libfs/src/rfs/rtems-rfs-inode.c
@@ -3,7 +3,7 @@
*
* @brief RTEMS File Systems Inode Routines
* @ingroup rtems_rfs
- *
+ *
* These functions manage inodes in the RFS file system. An inode is part of a
* block that reside after the bitmaps in the group.
*/
@@ -286,6 +286,17 @@ rtems_rfs_inode_create (rtems_rfs_file_system* fs,
rtems_rfs_inode_set_links (&parent_inode,
rtems_rfs_inode_get_links (&parent_inode) + 1);
+ /*
+ * Update the parent's mtime.
+ */
+ rc = rtems_rfs_inode_time_stamp_now (&parent_inode, true, true);
+ if (rc > 0)
+ {
+ rtems_rfs_inode_delete (fs, &inode);
+ rtems_rfs_inode_close (fs, &inode);
+ return rc;
+ }
+
rc = rtems_rfs_inode_close (fs, &parent_inode);
if (rc > 0)
{