xfs: ensure correct timestamp updates from truncate
authorChristoph Hellwig <hch@infradead.org>
Sun, 9 Feb 2014 23:35:22 +0000 (10:35 +1100)
committerDave Chinner <david@fromorbit.com>
Sun, 9 Feb 2014 23:35:22 +0000 (10:35 +1100)
commitfe60a8a0919eeee862054137fed49f00b710d9cd
treed4dd5f712971d23d7fcb356faec259e058c3f06e
parent38dbfb59d1175ef458d006556061adeaa8751b72
xfs: ensure correct timestamp updates from truncate

The VFS doesn't set the proper ATTR_CTIME and ATTR_MTIME values for
truncate, so filesystems have to manually add them.  The
introduction of xfs_setattr_time accidentally broke this special
case an caused a regression in generic/313.  Fix this by removing
the local mask variable in xfs_setattr_size so that we only have a
single place to keep the attribute information.

cc: <stable@vger.kernel.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Jie Liu <jeff.liu@oracle.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
fs/xfs/xfs_iops.c