mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-29 21:58:20 +00:00
fs: fix fifo
This commit is contained in:
@@ -1064,7 +1064,6 @@ static int ext2_open(vnode_t **vnodep, int flags, cred_t *cred) {
|
||||
|
||||
int error = 0;
|
||||
if (type == V_TYPE_FIFO) {
|
||||
VOP_LOCK(*vnodep);
|
||||
vnode_t *fifo;
|
||||
error = pipefs_getbinding(*vnodep, &fifo);
|
||||
VOP_UNLOCK(*vnodep);
|
||||
@@ -1074,9 +1073,12 @@ static int ext2_open(vnode_t **vnodep, int flags, cred_t *cred) {
|
||||
VOP_LOCK(fifo);
|
||||
error = VOP_OPEN(&fifo, flags, cred);
|
||||
VOP_UNLOCK(fifo);
|
||||
VOP_LOCK(*vnodep);
|
||||
|
||||
if (error == 0)
|
||||
if (error == 0) {
|
||||
VOP_HOLD(fifo);
|
||||
*vnodep = fifo;
|
||||
}
|
||||
}
|
||||
|
||||
return error;
|
||||
|
||||
@@ -183,8 +183,10 @@ static int tmpfs_open(vnode_t **nodep, int flags, cred_t *cred) {
|
||||
return error;
|
||||
|
||||
VOP_LOCK(fifo);
|
||||
VOP_UNLOCK(node);
|
||||
error = VOP_OPEN(&fifo, flags, cred);
|
||||
VOP_UNLOCK(fifo);
|
||||
VOP_LOCK(node);
|
||||
if (error == 0) {
|
||||
*nodep = fifo;
|
||||
VOP_HOLD(fifo);
|
||||
|
||||
Reference in New Issue
Block a user