Skip to content

Commit e351112

Browse files
committed
Do not ignore error codes for linux readahead
1 parent 90e07e0 commit e351112

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/io.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2067,8 +2067,8 @@ static void
20672067
_dispatch_operation_advise(dispatch_operation_t op, size_t chunk_size)
20682068
{
20692069
#ifdef __linux__
2070-
// radvisory and F_RDAVICE is not support, to reuse code
2071-
// define structure here and use readahead
2070+
// radvisory and F_RDAVICE is not supported
2071+
// to reuse code define structure here and use readahead
20722072
struct radvisory {
20732073
off_t ra_offset;
20742074
int ra_count;
@@ -2096,8 +2096,6 @@ _dispatch_operation_advise(dispatch_operation_t op, size_t chunk_size)
20962096
#ifdef __linux__
20972097
_dispatch_io_syscall_switch(err,
20982098
readahead(op->fd_entry->fd, advise.ra_offset, advise.ra_count),
2099-
case EBADF: break; // bad file desciptor
2100-
case EINVAL: break; // wrong file type to apply
21012099
default: (void)dispatch_assume_zero(err); break;
21022100
);
21032101
#else

0 commit comments

Comments
 (0)