summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2016-10-27 17:53:41 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2016-10-27 17:53:41 +0200
commit902f0a78b43c75bdb125a8f1c11a3fbf2595ce35 (patch)
tree795a533a1d19339a8616c2ca6980d0bd62d8bc43
parent341f43df4b3688702746b5d0365c05d99fdeeb4e (diff)
libdiskfs: Fix timestamp update on file close
* libdiskfs/node-nrele.c (diskfs_nrele): Call diskfs_set_node_times when there are no hard refs any more, like diskfs_nput does.
-rw-r--r--libdiskfs/node-nrele.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libdiskfs/node-nrele.c b/libdiskfs/node-nrele.c
index a96d1346..ed418a19 100644
--- a/libdiskfs/node-nrele.c
+++ b/libdiskfs/node-nrele.c
@@ -40,6 +40,10 @@ diskfs_nrele (struct node *np)
{
locked = TRUE;
pthread_mutex_lock (&np->lock);
+ /* This is our cue that something akin to "last process closes file"
+ in the POSIX.1 sense happened, so make sure any pending node time
+ updates now happen in a timely fashion. */
+ diskfs_set_node_times (np);
diskfs_lost_hardrefs (np);
if (!np->dn_stat.st_nlink)
{