X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=support%2Fnfs%2Fcacheio.c;h=3e868d8843e9c9153be7ee595eec4517ec5cd5b4;hp=d7ad4293762f4b6dd583fec668cb0ea9df47b733;hb=2e075a16da4963f54cd556403ca9e15a68de27fd;hpb=ff42180930a444cea7f19e55e2cd2bfe6d3f108b;ds=sidebyside diff --git a/support/nfs/cacheio.c b/support/nfs/cacheio.c index d7ad429..3e868d8 100644 --- a/support/nfs/cacheio.c +++ b/support/nfs/cacheio.c @@ -259,9 +259,9 @@ cache_flush(int force) "nfsd.export", NULL }; - stb.st_mtime = time(0); - if (!force) - stat(_PATH_ETAB, &stb); + if (force || + stat(_PATH_ETAB, &stb) != 0) + stb.st_mtime = time(0); sprintf(stime, "%ld\n", stb.st_mtime); for (c=0; cachelist[c]; c++) {