Fix some unbalanced sched_lock()/sched_unlock() pairs int the re-implemented VFS semaphore and message queue logic

This commit is contained in:
Gregory Nutt
2014-09-29 16:13:07 -06:00
parent e340d89990
commit 5462ede661
5 changed files with 12 additions and 4 deletions
+1
View File
@@ -150,6 +150,7 @@ int mq_close(mqd_t mqdes)
/* Decrement the reference count on the inode */
mq_inode_release(inode);
sched_unlock();
}
return OK;
+2 -1
View File
@@ -235,9 +235,10 @@ mqd_t mq_open(const char *mq_name, int oflags, ...)
inode->u.i_mqueue = msgq;
msgq->inode = inode;
}
sched_unlock();
}
sched_unlock();
return mqdes;
errout_with_msgq:
+2
View File
@@ -160,6 +160,7 @@ int mq_unlink(FAR const char *mq_name)
inode_semgive();
mq_inode_release(inode);
sched_unlock();
return OK;
errout_with_semaphore:
@@ -168,5 +169,6 @@ errout_with_inode:
inode_release(inode);
errout:
set_errno(errcode);
sched_unlock();
return ERROR;
}