Files
ubports_kernel_google_msm/include/linux
NeilBrown 4a30131e7d [PATCH] Fix some problems with truncate and mtime semantics.
SUS requires that when truncating a file to the size that it currently
is:
  truncate and ftruncate should NOT modify ctime or mtime
  O_TRUNC SHOULD modify ctime and mtime.

Currently mtime and ctime are always modified on most local
filesystems (side effect of ->truncate) or never modified (on NFS).

With this patch:
  ATTR_CTIME|ATTR_MTIME are sent with ATTR_SIZE precisely when
    an update of these times is required whether size changes or not
    (via a new argument to do_truncate).  This allows NFS to do
    the right thing for O_TRUNC.
  inode_setattr nolonger forces ATTR_MTIME|ATTR_CTIME when the ATTR_SIZE
    sets the size to it's current value.  This allows local filesystems
    to do the right thing for f?truncate.

Also, the logic in inode_setattr is changed a bit so there are two return
points.  One returns the error from vmtruncate if it failed, the other
returns 0 (there can be no other failure).

Finally, if vmtruncate succeeds, and ATTR_SIZE is the only change
requested, we now fall-through and mark_inode_dirty.  If a filesystem did
not have a ->truncate function, then vmtruncate will have changed i_size,
without marking the inode as 'dirty', and I think this is wrong.

Signed-off-by: Neil Brown <neilb@suse.de>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-08 20:13:52 -08:00
..
2006-01-06 14:58:39 -05:00
2006-01-04 12:40:39 +00:00
2005-11-13 18:14:17 -08:00
2006-01-03 13:11:06 -08:00
2006-01-08 20:13:49 -08:00
2005-11-13 18:14:10 -08:00
2005-11-22 19:39:30 -08:00
2006-01-05 22:16:26 -08:00
2006-01-06 08:33:54 -08:00
2006-01-06 13:24:54 -08:00
2006-01-06 13:24:29 -08:00
2006-01-06 08:33:53 -08:00
2006-01-06 08:33:59 -08:00
2006-01-06 08:33:29 -08:00
2005-12-12 08:57:43 -08:00
2006-01-08 20:12:43 -08:00
2006-01-08 20:13:46 -08:00
2006-01-06 08:33:20 -08:00
2006-01-03 13:11:15 -08:00
2006-01-06 08:33:29 -08:00
2005-11-13 18:14:12 -08:00
2006-01-06 08:33:56 -08:00
2006-01-08 20:13:45 -08:00
2006-01-06 08:33:27 -08:00
2006-01-08 20:13:40 -08:00
2006-01-08 20:13:46 -08:00
2006-01-08 20:13:45 -08:00
2005-12-12 08:57:42 -08:00
2006-01-08 20:12:40 -08:00