~ft/ext4srv

beed6d30ff53f0902feac9ca998195cc39e3d722 — Sigrid Solveig Haflínudóttir 3 months ago 64643c0
create: set mtime and ctime
1 files changed, 4 insertions(+), 0 deletions(-)

M ext4srv.c
M ext4srv.c => ext4srv.c +4 -0
@@ 291,6 291,7 @@ rcreate(Req *r)
	struct ext4_inode inode;
	char *s, *err, *q;
	int mkdir, res;
	long tm;
	Aux *a;

	a = r->fid->aux;


@@ 360,6 361,9 @@ Nomem:
	if((res = ext4_mode_set(s, perm)) != 0)
		goto ext4errorrm;
	ext4_owner_set(s, a->uid, a->uid);
	tm = time(nil);
	ext4_mtime_set(s, tm);
	ext4_ctime_set(s, tm);

	r->fid->qid.path = a->p->qidmask.path | a->file->inode;
	r->fid->qid.vers = 0;