mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-11-02 07:28:21 +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;
|
int error = 0;
|
||||||
if (type == V_TYPE_FIFO) {
|
if (type == V_TYPE_FIFO) {
|
||||||
VOP_LOCK(*vnodep);
|
|
||||||
vnode_t *fifo;
|
vnode_t *fifo;
|
||||||
error = pipefs_getbinding(*vnodep, &fifo);
|
error = pipefs_getbinding(*vnodep, &fifo);
|
||||||
VOP_UNLOCK(*vnodep);
|
VOP_UNLOCK(*vnodep);
|
||||||
@@ -1074,10 +1073,13 @@ static int ext2_open(vnode_t **vnodep, int flags, cred_t *cred) {
|
|||||||
VOP_LOCK(fifo);
|
VOP_LOCK(fifo);
|
||||||
error = VOP_OPEN(&fifo, flags, cred);
|
error = VOP_OPEN(&fifo, flags, cred);
|
||||||
VOP_UNLOCK(fifo);
|
VOP_UNLOCK(fifo);
|
||||||
|
VOP_LOCK(*vnodep);
|
||||||
|
|
||||||
if (error == 0)
|
if (error == 0) {
|
||||||
|
VOP_HOLD(fifo);
|
||||||
*vnodep = fifo;
|
*vnodep = fifo;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -183,8 +183,10 @@ static int tmpfs_open(vnode_t **nodep, int flags, cred_t *cred) {
|
|||||||
return error;
|
return error;
|
||||||
|
|
||||||
VOP_LOCK(fifo);
|
VOP_LOCK(fifo);
|
||||||
|
VOP_UNLOCK(node);
|
||||||
error = VOP_OPEN(&fifo, flags, cred);
|
error = VOP_OPEN(&fifo, flags, cred);
|
||||||
VOP_UNLOCK(fifo);
|
VOP_UNLOCK(fifo);
|
||||||
|
VOP_LOCK(node);
|
||||||
if (error == 0) {
|
if (error == 0) {
|
||||||
*nodep = fifo;
|
*nodep = fifo;
|
||||||
VOP_HOLD(fifo);
|
VOP_HOLD(fifo);
|
||||||
|
|||||||
Reference in New Issue
Block a user