`posix_fadvise()` returns 0 on success and the errno on error. This
commit fixes the handling of the return value such that it does not
always succeeds.
Fixes#3322.
It's possible to set both `atim` and `atim_now` in the `fstflags`
parameter. Same goes for `mtin` and `mtim_now`. However, it's
ambiguous which time should be set in these two cases. This commit
checks this and returns `EINVAL`.