mirror of
https://github.com/apache/nuttx.git
synced 2025-12-16 01:34:58 +08:00
Check return from nxsem_wait_initialize()
Resolution of Issue 619 will require multiple steps, this part of the first step in that resolution: Every call to nxsem_wait_uninterruptible() must handle the return value from nxsem_wait_uninterruptible properly. This commit is only for those files under fs/driver, fs/aio, fs/nfs, crypto/, and boards/. Please note: The modified file under fs/nfs generates several " Mixed case identifier found" errors. Please ignore these. These cannot be fixed without changes to numerous other files. They also follow a non-standard convention that is used many files: Using lower case structure names in custom SIZEOF_ definitions.
This commit is contained in:
committed by
Abdelatif Guettouche
parent
15fac7743c
commit
ae401cecdd
@@ -176,16 +176,17 @@ void mq_inode_release(FAR struct inode *inode)
|
||||
|
||||
/* Decrement the reference count on the inode */
|
||||
|
||||
ret = inode_semtake();
|
||||
if (ret < 0)
|
||||
do
|
||||
{
|
||||
/* REVISIT: Should get here only on task cancellation. The MQ inode
|
||||
* would not not be released in this case.
|
||||
ret = inode_semtake();
|
||||
|
||||
/* The only error that is expected is due to thread cancellation.
|
||||
* At this point, we must continue to free the mqueue anyway.
|
||||
*/
|
||||
|
||||
ferr("ERROR: inode_semtake() failed: %d\n", ret);
|
||||
return;
|
||||
DEBUGASSERT(ret == OK || ret == -ECANCELED);
|
||||
}
|
||||
while (ret < 0);
|
||||
|
||||
if (inode->i_crefs > 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user