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:
Xiang Xiao
2022-10-26 18:15:16 +08:00
committed by Petro Karashchenko
parent 4d4bb458da
commit 604eea453b
7 changed files with 28 additions and 24 deletions
+2 -2
View File
@@ -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);