X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=support%2Fnfs%2Fcacheio.c;fp=support%2Fnfs%2Fcacheio.c;h=ff5b02813e256c12b017da5356d80ecb17b9c43c;hp=77facb1eaccc7158dedef07f08db8c0bef448017;hb=bce6f6871f481087890674497b4b2154dc4825fc;hpb=3094278cd11c3c18d5426210e09e3c903a7a41a3 diff --git a/support/nfs/cacheio.c b/support/nfs/cacheio.c index 77facb1..ff5b028 100644 --- a/support/nfs/cacheio.c +++ b/support/nfs/cacheio.c @@ -260,7 +260,7 @@ cache_flush(int force) int fd; sprintf(path, "/proc/net/rpc/%s/flush", cachelist[c]); fd = open(path, O_RDWR); - if (fd) { + if (fd >= 0) { write(fd, stime, strlen(stime)); close(fd); }