summaryrefslogtreecommitdiff
path: root/nuttx/fs/fs_mount.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2007-05-27 18:08:18 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2007-05-27 18:08:18 +0000
commit9f53bc85a64da31a21ede71a112f2f6c0486417b (patch)
tree5a9efc0762dca5d39b1f748bb516e19d38fb178a /nuttx/fs/fs_mount.c
parent9f5af96aa10a6bca769370503e19b4651b81c0a9 (diff)
downloadpx4-nuttx-9f53bc85a64da31a21ede71a112f2f6c0486417b.tar.gz
px4-nuttx-9f53bc85a64da31a21ede71a112f2f6c0486417b.tar.bz2
px4-nuttx-9f53bc85a64da31a21ede71a112f2f6c0486417b.zip
Add stat()
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@257 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/fs/fs_mount.c')
-rw-r--r--nuttx/fs/fs_mount.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/nuttx/fs/fs_mount.c b/nuttx/fs/fs_mount.c
index 1f64b1eb2..00b80a574 100644
--- a/nuttx/fs/fs_mount.c
+++ b/nuttx/fs/fs_mount.c
@@ -225,6 +225,10 @@ int mount(const char *source, const char *target,
goto errout_with_mountpt;
}
+ /* Increment reference count for the reference we pass to the file system */
+
+ blkdrvr_inode->i_crefs++;
+
/* On failure, the bind method returns -errorcode */
status = mops->bind(blkdrvr_inode, data, &fshandle);
@@ -233,7 +237,7 @@ int mount(const char *source, const char *target,
/* The inode is unhappy with the blkdrvr for some reason */
errcode = -status;
- goto errout_with_mountpt;
+ goto errout_with_blkdrvr2;
}
/* We have it, now populate it with driver specific information. */
@@ -258,6 +262,9 @@ int mount(const char *source, const char *target,
/* A lot of goto's! But they make the error handling much simpler */
+ errout_with_blkdrvr2:
+ inode_release(blkdrvr_inode);
+
errout_with_mountpt:
inode_release(mountpt_inode);