mirror of
https://github.com/apache/nuttx.git
synced 2026-05-26 02:36:11 +08:00
fs/vfs: Let caller control whether add the reference count of inode in file_allocate
to simplify the caller in some special case Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
committed by
Petro Karashchenko
parent
4d4bb458da
commit
604eea453b
+2
-2
@@ -349,11 +349,11 @@ static mqd_t nxmq_vopen(FAR const char *mq_name, int oflags, va_list ap)
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = file_allocate(mq.f_inode, mq.f_oflags, mq.f_pos, mq.f_priv, 0);
|
||||
ret = file_allocate(mq.f_inode, mq.f_oflags,
|
||||
mq.f_pos, mq.f_priv, 0, false);
|
||||
if (ret < 0)
|
||||
{
|
||||
file_mq_close(&mq);
|
||||
|
||||
if (created)
|
||||
{
|
||||
file_mq_unlink(mq_name);
|
||||
|
||||
Reference in New Issue
Block a user