summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2015-01-31 21:31:53 +0000
committerkib <kib@FreeBSD.org>2015-01-31 21:31:53 +0000
commit1831e3d7dcde53b6f53b3d79d72dc59b8cc1420b (patch)
tree1ed13c987554441181696487c402bcf984ee7d37 /sys
parent086d1fe33f6d2be13af4f39df8d9d1ffe134f601 (diff)
downloadFreeBSD-src-1831e3d7dcde53b6f53b3d79d72dc59b8cc1420b.zip
FreeBSD-src-1831e3d7dcde53b6f53b3d79d72dc59b8cc1420b.tar.gz
Update directory times immediately after an entry is created or
removed. Postponing it until tmpfs_getattr() is called causes discordant values reported for file times vs. directory times. Reported and tested by: madpilot Sponsored by: The FreeBSD Foundation MFC after: 1 week
Diffstat (limited to 'sys')
-rw-r--r--sys/fs/tmpfs/tmpfs_subr.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/fs/tmpfs/tmpfs_subr.c b/sys/fs/tmpfs/tmpfs_subr.c
index af0a8af..6c4a403 100644
--- a/sys/fs/tmpfs/tmpfs_subr.c
+++ b/sys/fs/tmpfs/tmpfs_subr.c
@@ -991,6 +991,7 @@ tmpfs_dir_attach(struct vnode *vp, struct tmpfs_dirent *de)
dnode->tn_size += sizeof(struct tmpfs_dirent);
dnode->tn_status |= TMPFS_NODE_ACCESSED | TMPFS_NODE_CHANGED | \
TMPFS_NODE_MODIFIED;
+ tmpfs_update(vp);
}
/*
@@ -1036,6 +1037,7 @@ tmpfs_dir_detach(struct vnode *vp, struct tmpfs_dirent *de)
dnode->tn_size -= sizeof(struct tmpfs_dirent);
dnode->tn_status |= TMPFS_NODE_ACCESSED | TMPFS_NODE_CHANGED | \
TMPFS_NODE_MODIFIED;
+ tmpfs_update(vp);
}
void
OpenPOWER on IntegriCloud