shithub: riscv

Download patch

ref: bab31af707aab34da9ba2b2975c05d7b3cb568cc
parent: 9ec1a07af2537e5485524c8d079a07abfee6f96d
author: cinap_lenrek <[email protected]>
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);