提交 71fb988a 编写于 作者: O openharmony_ci 提交者: Gitee

!72 修复: pipecommon_open/close操作时进行usecount++/--操作时未进行加锁处理

Merge pull request !72 from phchang/fixfifo
......@@ -281,9 +281,9 @@ int pipecommon_open(struct file *filep)
(void)pipecommon_close(filep);
}
}
VnodeHold();
vnode->useCount++;
VnodeDrop();
return ret;
}
......@@ -378,9 +378,9 @@ int pipecommon_close(struct file *filep)
dev->d_nwriters = 0;
dev->d_nreaders = 0;
}
VnodeHold();
vnode->useCount--;
VnodeDrop();
sem_post(&dev->d_bfsem);
return OK;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册