VFS: fix select bug on pipes
This commit is contained in:
parent
28b81f9c3b
commit
306f3ccd6f
1 changed files with 2 additions and 2 deletions
|
@ -452,7 +452,7 @@ static int select_request_pipe(struct filp *f, int *ops, int block)
|
||||||
|
|
||||||
if ((*ops & (SEL_RD|SEL_ERR))) {
|
if ((*ops & (SEL_RD|SEL_ERR))) {
|
||||||
/* Check if we can read 1 byte */
|
/* Check if we can read 1 byte */
|
||||||
err = pipe_check(f->filp_vno, READING, 0, 1, 1 /* Check only */);
|
err = pipe_check(f->filp_vno, READING, f->filp_flags, 1, 1 /* Check only */);
|
||||||
|
|
||||||
if (err != SUSPEND)
|
if (err != SUSPEND)
|
||||||
r |= SEL_RD;
|
r |= SEL_RD;
|
||||||
|
@ -468,7 +468,7 @@ static int select_request_pipe(struct filp *f, int *ops, int block)
|
||||||
|
|
||||||
if ((*ops & (SEL_WR|SEL_ERR))) {
|
if ((*ops & (SEL_WR|SEL_ERR))) {
|
||||||
/* Check if we can write 1 byte */
|
/* Check if we can write 1 byte */
|
||||||
err = pipe_check(f->filp_vno, WRITING, 0, 1, 1 /* Check only */);
|
err = pipe_check(f->filp_vno, WRITING, f->filp_flags, 1, 1 /* Check only */);
|
||||||
|
|
||||||
if (err != SUSPEND)
|
if (err != SUSPEND)
|
||||||
r |= SEL_WR;
|
r |= SEL_WR;
|
||||||
|
|
Loading…
Reference in a new issue