kernel: vfs: don't notify output-only select events by default
Output-only events (B_EVENT_ERROR, B_EVENT_DISCONNECTED and B_EVENT_INVALID, with B_EVENT_INVALID masked out before passing down events) are used to indicate error, so they should not be notified if the vnode does not have select(). Bug: 13965
This commit is contained in:
parent
f3b05a74bb
commit
a9388f6d39
|
@ -52,6 +52,7 @@
|
||||||
#include <vfs.h>
|
#include <vfs.h>
|
||||||
#include <vm/vm.h>
|
#include <vm/vm.h>
|
||||||
#include <vm/VMCache.h>
|
#include <vm/VMCache.h>
|
||||||
|
#include <wait_for_objects.h>
|
||||||
|
|
||||||
#include "EntryCache.h"
|
#include "EntryCache.h"
|
||||||
#include "fifo.h"
|
#include "fifo.h"
|
||||||
|
@ -5773,8 +5774,12 @@ file_select(struct file_descriptor* descriptor, uint8 event,
|
||||||
struct vnode* vnode = descriptor->u.vnode;
|
struct vnode* vnode = descriptor->u.vnode;
|
||||||
|
|
||||||
// If the FS has no select() hook, notify select() now.
|
// If the FS has no select() hook, notify select() now.
|
||||||
if (!HAS_FS_CALL(vnode, select))
|
if (!HAS_FS_CALL(vnode, select)) {
|
||||||
|
if (!SELECT_TYPE_IS_OUTPUT_ONLY(event))
|
||||||
return notify_select_event(sync, event);
|
return notify_select_event(sync, event);
|
||||||
|
else
|
||||||
|
return B_OK;
|
||||||
|
}
|
||||||
|
|
||||||
return FS_CALL(vnode, select, descriptor->cookie, event, sync);
|
return FS_CALL(vnode, select, descriptor->cookie, event, sync);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue