[rtems commit] libfs: Fix the warning in the RFS.

Chris Johns chrisj at rtems.org
Wed Sep 3 03:07:22 UTC 2014


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

Author:    Chris Johns <chrisj at rtems.org>
Date:      Wed Sep  3 13:15:24 2014 +1000

libfs: Fix the warning in the RFS.

Return the first error if one or more happen when deleting an inode.

---

 cpukit/libfs/src/rfs/rtems-rfs-inode.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/cpukit/libfs/src/rfs/rtems-rfs-inode.c b/cpukit/libfs/src/rfs/rtems-rfs-inode.c
index 718120f..57439a0 100644
--- a/cpukit/libfs/src/rfs/rtems-rfs-inode.c
+++ b/cpukit/libfs/src/rfs/rtems-rfs-inode.c
@@ -352,12 +352,17 @@ rtems_rfs_inode_delete (rtems_rfs_file_system*  fs,
       rtems_rfs_buffer_mark_dirty (&handle->buffer);
       /*
        * Do the release here to avoid the ctime field being set on a
-       * close. Also if there loads is greater then one then other loads
+       * close. Also if the loads is greater then one then other loads
        * active. Forcing the loads count to 0.
        */
       rc = rtems_rfs_buffer_handle_release (fs, &handle->buffer);
       handle->loads = 0;
       handle->node = NULL;
+      /*
+       * Return the first error and drop any that followed.
+       */
+      if (rrc > 0)
+        rc = rrc;
     }
   }
   return rc;



More information about the vc mailing list