[rtems commit] NFS: Fix use of self-contained objects

Sebastian Huber sebh at rtems.org
Wed Feb 7 13:14:23 UTC 2018


Module:    rtems
Branch:    master
Commit:    e16111b2cf1640a2ddb1cf3910c76836f875d465
Changeset: http://git.rtems.org/rtems/commit/?id=e16111b2cf1640a2ddb1cf3910c76836f875d465

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Wed Feb  7 08:57:18 2018 +0100

NFS: Fix use of self-contained objects

Update #2843.

---

 cpukit/libfs/src/nfsclient/src/nfs.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/cpukit/libfs/src/nfsclient/src/nfs.c b/cpukit/libfs/src/nfsclient/src/nfs.c
index 4eb4249..f4f5319 100644
--- a/cpukit/libfs/src/nfsclient/src/nfs.c
+++ b/cpukit/libfs/src/nfsclient/src/nfs.c
@@ -652,13 +652,13 @@ static struct nfsstats {
 		 * linked ist of mounted NFS
 		 * and the num_mounted_fs field
 		 */
-	rtems_id					llock;
+	rtems_recursive_mutex			llock;
 		/* A lock for protecting misc
 		 * stuff  within the driver.
 		 * The lock must only be held
 		 * for short periods of time.
 		 */
-	rtems_id					lock;
+	rtems_recursive_mutex			lock;
 		/* Our major number as assigned
 		 * by RTEMS
 		 */
@@ -691,7 +691,7 @@ static struct nfsstats {
 	 */
 	RpcUdpXactPool smallPool;
 	RpcUdpXactPool bigPool;
-} nfsGlob = {0, 0,  0xffffffff, 0, 0, 0, NULL, NULL};
+} nfsGlob = {RTEMS_RECURSIVE_MUTEX_INITIALIZER("NFS List"), RTEMS_RECURSIVE_MUTEX_INITIALIZER("NFS Misc"),  0xffffffff, 0, 0, 0, NULL, NULL};
 
 /*
  * Global variable to tune the 'st_blksize' (stat(2)) value this nfs
@@ -3082,7 +3082,7 @@ typedef struct ResolvePathArgRec_ {
 	rtems_filesystem_location_info_t	*loc;	/* IN: location to resolve	*/
 	char								*buf;	/* IN/OUT: buffer where to put the path */
 	int									len;	/* IN: buffer length		*/
-	rtems_id							sync;	/* IN: synchronization		*/
+	rtems_binary_semaphore			sync;	/* IN: synchronization		*/
 	rtems_status_code					status; /* OUT: result				*/
 } ResolvePathArgRec, *ResolvePathArg;
 
@@ -3130,7 +3130,6 @@ rtems_status_code	status;
 	arg.loc  = loc;
 	arg.buf  = buf;
 	arg.len  = len;
-	arg.sync = 0;
 
 	rtems_binary_semaphore_init(&arg.sync, "NFSress");
 




More information about the vc mailing list