From: Vladimir Saveliev Date: Sat, 1 Jul 2006 11:36:32 +0000 (-0700) Subject: [PATCH] reiserfs: update ctime and mtime on expanding truncate X-Git-Tag: v2.6.18-rc1~198 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dd535a5965cef7551da34aef5cec47f46e97b6d9;p=linux-2.6 [PATCH] reiserfs: update ctime and mtime on expanding truncate Reiserfs does not update ctime and mtime on expanding truncate via truncate(). This patch fixes it. Signed-off-by: Vladimir Saveliev Cc: Hans Reiser Cc: Michael Kerrisk Cc: Chris Mason Cc: Jeff Mahoney Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/reiserfs/inode.c b/fs/reiserfs/inode.c index 477eaa2fcf..12dfdcfbee 100644 --- a/fs/reiserfs/inode.c +++ b/fs/reiserfs/inode.c @@ -2932,6 +2932,11 @@ int reiserfs_setattr(struct dentry *dentry, struct iattr *attr) } if (error) goto out; + /* + * file size is changed, ctime and mtime are + * to be updated + */ + attr->ia_valid |= (ATTR_MTIME | ATTR_CTIME); } }