X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=support%2Fnfs%2Frmtab.c;h=b7be6ba6b0a86ae7353872d30c907026be27f0a6;hp=da40e486a052e45de082bf8dd654cbefd2e6bcc1;hb=77c32fa565d6af59cbeb8601e08efa9af6ef3d81;hpb=70a0e44cc77a7d8fc78c5514889bcd5d4fde3599 diff --git a/support/nfs/rmtab.c b/support/nfs/rmtab.c index da40e48..b7be6ba 100644 --- a/support/nfs/rmtab.c +++ b/support/nfs/rmtab.c @@ -114,8 +114,14 @@ endrmtabent(void) void fendrmtabent(FILE *fp) { - if (fp) + if (fp) { + /* If it was written to, we really want + * to flush to disk before returning + */ + fflush(fp); + fdatasync(fileno(fp)); fclose(fp); + } } void