- before_mknod = time(0);
- rc = mknod(argv[1], 0700, S_IFREG);
+ /* Adjust the before time back one second, because the kernel's
+ * CURRENT_TIME (lockless clock reading, used to set inode times)
+ * may drift against the do_gettimeofday() time (TSC-corrected and
+ * locked clock reading, used to return timestamps to user space).
+ * This means that the mknod time could be a second older than the
+ * before time, even for a local filesystem such as ext3.
+ */
+ before_mknod = time(0) - 1;
+ rc = mknod(filename, 0700, S_IFREG);