summaryrefslogtreecommitdiff
path: root/nuttx/fs
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2009-05-29 13:32:00 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2009-05-29 13:32:00 +0000
commit87f04994cfa2431cc09168c47239f47f5a308cdd (patch)
treed1b8838f6e4393f261973c7fea8830b950da4dff /nuttx/fs
parent2c5f9e8a3d36d8849cb7181cf047f8e0352e7d85 (diff)
downloadpx4-nuttx-87f04994cfa2431cc09168c47239f47f5a308cdd.tar.gz
px4-nuttx-87f04994cfa2431cc09168c47239f47f5a308cdd.tar.bz2
px4-nuttx-87f04994cfa2431cc09168c47239f47f5a308cdd.zip
Fix mount problem
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1835 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/fs')
-rw-r--r--nuttx/fs/fat/fs_fat32.c4
-rw-r--r--nuttx/fs/fs_mount.c11
2 files changed, 9 insertions, 6 deletions
diff --git a/nuttx/fs/fat/fs_fat32.c b/nuttx/fs/fat/fs_fat32.c
index a0a277475..a28d57a4e 100644
--- a/nuttx/fs/fat/fs_fat32.c
+++ b/nuttx/fs/fat/fs_fat32.c
@@ -1,7 +1,7 @@
/****************************************************************************
* fs_fat32.c
*
- * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* References:
@@ -1482,7 +1482,7 @@ static int fat_bind(FAR struct inode *blkdriver, const void *data,
}
if (blkdriver->u.i_bops->open &&
- blkdriver->u.i_bops->open(blkdriver) != OK)
+ blkdriver->u.i_bops->open(blkdriver) != OK)
{
return -ENODEV;
}
diff --git a/nuttx/fs/fs_mount.c b/nuttx/fs/fs_mount.c
index d0806ba7d..22af7a136 100644
--- a/nuttx/fs/fs_mount.c
+++ b/nuttx/fs/fs_mount.c
@@ -1,7 +1,7 @@
/****************************************************************************
* fs/fs_mount.c
*
- * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -231,7 +231,7 @@ int mount(const char *source, const char *target,
fdbg("Bind method failed: %d\n", status);
errcode = -status;
- goto errout_with_blkdrvr;
+ goto errout_with_mountpt;
}
/* We have it, now populate it with driver specific information. */
@@ -256,13 +256,16 @@ int mount(const char *source, const char *target,
/* A lot of goto's! But they make the error handling much simpler */
-errout_with_blkdrvr:
- inode_release(blkdrvr_inode);
errout_with_mountpt:
+ inode_semgive();
+ inode_release(blkdrvr_inode);
inode_release(mountpt_inode);
+ goto errout;
+
errout_with_semaphore:
inode_semgive();
inode_release(blkdrvr_inode);
+
errout:
errno = errcode;
return ERROR;