summaryrefslogtreecommitdiffstats
path: root/cpukit/libfs
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2010-10-18 22:48:55 +0000
committerChris Johns <chrisj@rtems.org>2010-10-18 22:48:55 +0000
commitab52da4049b0bb354b450e323d74e80dab477bc4 (patch)
treed39d5175b9c5db8376544524ed9fdf3c59bb3888 /cpukit/libfs
parentDisable trace. (diff)
downloadrtems-ab52da4049b0bb354b450e323d74e80dab477bc4.tar.bz2
2010-10-19 Chris Johns <chrisj@rtems.org>
* libfs/src/rfs/rtems-rfs-rtems-file.c: Add missing unlock in write. Return the error code in close.
Diffstat (limited to 'cpukit/libfs')
-rw-r--r--cpukit/libfs/src/rfs/rtems-rfs-rtems-file.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/cpukit/libfs/src/rfs/rtems-rfs-rtems-file.c b/cpukit/libfs/src/rfs/rtems-rfs-rtems-file.c
index 0c918a9fb1..5be618d8c6 100644
--- a/cpukit/libfs/src/rfs/rtems-rfs-rtems-file.c
+++ b/cpukit/libfs/src/rfs/rtems-rfs-rtems-file.c
@@ -100,7 +100,7 @@ rtems_rfs_rtems_file_close (rtems_libio_t* iop)
rc = rtems_rfs_rtems_error ("file-close: file close", rc);
rtems_rfs_rtems_unlock (fs);
- return 0;
+ return rc;
}
/**
@@ -203,7 +203,10 @@ rtems_rfs_rtems_file_write (rtems_libio_t* iop,
{
rc = rtems_rfs_file_set_size (file, pos);
if (rc)
+ {
+ rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
return rtems_rfs_rtems_error ("file-write: write extend", rc);
+ }
rtems_rfs_file_set_bpos (file, pos);
}