summaryrefslogtreecommitdiffstats
path: root/cpukit
diff options
context:
space:
mode:
authorJennifer Averett <Jennifer.Averett@OARcorp.com>2002-11-07 15:45:09 +0000
committerJennifer Averett <Jennifer.Averett@OARcorp.com>2002-11-07 15:45:09 +0000
commitdae3dd10986d209f116197c0d8d5fabf46dbe364 (patch)
treef214f67776779977948e88bb65dfc5a7ad5d6819 /cpukit
parent2002-11-07 Ralf Corsepius <corsepiu@faw.uni-ulm.de> (diff)
downloadrtems-dae3dd10986d209f116197c0d8d5fabf46dbe364.tar.bz2
2002-11-07 <strauman@slac.stanford.edu>
* src/mount.c: Per PR297, correct fs_mountme failure paths.
Diffstat (limited to 'cpukit')
-rw-r--r--cpukit/libcsupport/src/mount.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/cpukit/libcsupport/src/mount.c b/cpukit/libcsupport/src/mount.c
index ed10d9e749..16aca0daed 100644
--- a/cpukit/libcsupport/src/mount.c
+++ b/cpukit/libcsupport/src/mount.c
@@ -101,6 +101,13 @@ int mount(
return -1;
}
+ /* Do they support being mounted at all ? */
+ if ( !fs_ops->fsmount_me_h ) {
+ errno = ENOTSUP;
+ goto cleanup_and_bail;
+ }
+
+
/*
* Allocate a mount table entry
*/
@@ -207,14 +214,14 @@ int mount(
temp_mt_entry->mt_point_node.mt_entry = NULL;
}
- if ( !fs_ops->fsmount_me_h ) {
- errno = ENOTSUP;
+ if ( fs_ops->fsmount_me_h( temp_mt_entry ) ) {
+ /* try to undo the mount operation */
+ if ( loc.ops->unmount_h ) {
+ loc.ops->unmount_h( temp_mt_entry );
+ }
goto cleanup_and_bail;
}
- if ( fs_ops->fsmount_me_h( temp_mt_entry ) )
- goto cleanup_and_bail;
-
/*
* Add the mount table entry to the mount table chain
*/