diff options
Diffstat (limited to 'fadvise.c')
-rw-r--r-- | fadvise.c | 8 |
1 files changed, 1 insertions, 7 deletions
@@ -30,16 +30,10 @@ static void apply_fadvise(const char *path, off_t offset, off_t len, int advice) { int fd; - if ((fd = open(path, O_RDONLY|O_NOATIME)) < 0) { - if (errno == EPERM && O_NOATIME != 0) { - fd = open(path, O_RDONLY); - if (fd >= 0) - goto ok; - } + if ((fd = open_noatime(path) < 0)) { fprintf(stderr, "%s: open(): %s\n", path, strerror(errno)); return; } -ok: if (len <= 0) { /* for compatibility with kernels < 2.6.6 */ |