All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] 2.6 open(O_EXCL) sets silly mtime
@ 2004-04-20  8:18 Olaf Kirch
  2004-04-20 14:47 ` Trond Myklebust
  0 siblings, 1 reply; 3+ messages in thread
From: Olaf Kirch @ 2004-04-20  8:18 UTC (permalink / raw)
  To: nfs

[-- Attachment #1: Type: text/plain, Size: 209 bytes --]

Hi,

the attached patch (relative to 2.6.5) is required to make sure a file
created with O_EXCL gets the proper mtime.

Olaf
-- 
Olaf Kirch     |  The Hardware Gods hate me.
okir@suse.de   |
---------------+ 

[-- Attachment #2: nfs-o-excl-mtime --]
[-- Type: text/plain, Size: 450 bytes --]

--- linux-2.6.5/fs/nfs/nfs3proc.c.excl	2004-04-19 14:35:47.000000000 +0200
+++ linux-2.6.5/fs/nfs/nfs3proc.c	2004-04-19 16:55:50.000000000 +0200
@@ -375,6 +375,9 @@
 		};
 		dprintk("NFS call  setattr (post-create)\n");
 
+		if (!(sattr->ia_valid & ATTR_MTIME_SET))
+			sattr->ia_valid |= ATTR_MTIME;
+
 		/* Note: we could use a guarded setattr here, but I'm
 		 * not sure this buys us anything (and I'd have
 		 * to revamp the NFSv3 XDR code) */

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-04-21  8:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-20  8:18 [PATCH] 2.6 open(O_EXCL) sets silly mtime Olaf Kirch
2004-04-20 14:47 ` Trond Myklebust
2004-04-21  8:17   ` Olaf Kirch

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.