Christoph Hellwig d6d59bada3 xfs: fix timestamp handling in xfs_setattr
We currently have some rather odd code in xfs_setattr for
updating the a/c/mtime timestamps:

 - first we do a non-transaction update if all three are updated
   together
 - second we implicitly update the ctime for various changes
   instead of relying on the ATTR_CTIME flag
 - third we set the timestamps to the current time instead of the
   arguments in the iattr structure in many cases.

This patch makes sure we update it in a consistent way:

 - always transactional
 - ctime is only updated if ATTR_CTIME is set or we do a size
   update, which is a special case
 - always to the times passed in from the caller instead of the
   current time

The only non-size caller of xfs_setattr that doesn't come from
the VFS is updated to set ATTR_CTIME and pass in a valid ctime
value.

Reported-by: Eric Blake <ebb9@byu.net>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Elder <aelder@sgi.com>
2010-01-10 12:21:58 -06:00
..
2009-12-14 23:08:16 -06:00
2009-12-14 23:08:16 -06:00
2009-06-10 17:07:47 +02:00
2009-12-14 23:08:16 -06:00
2009-12-16 12:16:49 -05:00
2009-12-14 23:08:16 -06:00
2009-12-14 23:08:16 -06:00
2009-12-14 23:08:16 -06:00
2009-12-14 23:08:16 -06:00
2009-06-10 17:07:47 +02:00
2009-12-14 23:08:16 -06:00
2009-12-14 23:08:16 -06:00
2009-12-14 23:08:16 -06:00
2009-12-14 23:08:16 -06:00
2009-12-14 23:08:16 -06:00
2009-12-14 23:08:16 -06:00
2009-12-14 23:08:16 -06:00
2009-12-14 23:08:16 -06:00
2009-12-14 23:08:16 -06:00
2009-12-14 23:08:16 -06:00
2009-12-14 23:08:16 -06:00
2009-12-14 23:08:16 -06:00
2009-12-14 23:08:16 -06:00
2009-12-14 23:08:16 -06:00
2009-03-29 09:51:14 +02:00
2009-12-14 23:08:16 -06:00
2009-03-29 09:55:42 +02:00
2009-12-14 23:08:16 -06:00
2009-12-14 23:08:16 -06:00
2009-12-14 23:08:16 -06:00
2008-12-01 11:37:35 +11:00
2009-12-14 23:08:16 -06:00
2008-10-30 17:53:24 +11:00
2009-12-14 23:08:16 -06:00
2009-12-14 23:08:16 -06:00
2009-03-29 09:55:42 +02:00
2009-12-11 15:11:22 -06:00
2009-12-17 11:03:25 -05:00
2009-12-14 23:08:16 -06:00
2009-12-14 23:08:16 -06:00
2009-12-14 23:08:16 -06:00
2009-08-31 14:46:22 -05:00
2009-12-14 23:08:16 -06:00
2009-12-14 23:08:16 -06:00
2009-12-14 23:08:16 -06:00
2009-03-16 08:19:29 +01:00
2009-12-14 23:08:16 -06:00
2009-12-14 23:08:16 -06:00
2009-12-14 23:08:16 -06:00
2009-12-14 23:08:16 -06:00
2009-03-29 09:55:42 +02:00
2009-12-14 23:08:16 -06:00
2009-12-11 15:11:22 -06:00
2009-12-14 23:08:16 -06:00
2009-09-01 12:46:16 -05:00
2009-03-29 09:55:42 +02:00
2009-12-14 23:08:16 -06:00
2009-06-08 15:33:32 +02:00
2009-12-11 15:11:19 -06:00
2009-12-14 23:08:16 -06:00