From 5f9c208084dbde68cf56dbd2ab8c1421108aa45d Mon Sep 17 00:00:00 2001 From: Chris Johns Date: Wed, 3 Sep 2014 13:15:24 +1000 Subject: 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 file changed, 6 insertions(+), 1 deletion(-) (limited to 'cpukit/libfs/src/rfs/rtems-rfs-inode.c') diff --git a/cpukit/libfs/src/rfs/rtems-rfs-inode.c b/cpukit/libfs/src/rfs/rtems-rfs-inode.c index 718120f2ac..57439a03bd 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; -- cgit v1.2.3