git: 9front

Download patch

ref: f66b4dfba8da3cd77aebb2f8944d0999e1c864a6
parent: b96dc1adf9a3d44bce0a668b8b14d647d6dc302e
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Fri Oct 9 15:22:53 EDT 2015

cwfs: fix wstat() failing to mark block dirty when noatime is set

code assumed the accessdir() call would always mark the block dirty, but
this is not the case when noatime flag is enabled. this was reported by
michael in bug:

"open/with_noatime_option_cwfs_doesnt_preserve_changes_in_file_permissionowner"

--
cinap

--- a/sys/src/cmd/cwfs/9p2.c
+++ b/sys/src/cmd/cwfs/9p2.c
@@ -1789,6 +1789,7 @@
 		d->uid = uid;
 		d->gid = gid;
 		d->muid = muid;
+		p->flags |= Bmod;
 	}
 	if(!tsync)
 		accessdir(p, d, FREAD, file->uid);
--