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-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=dd535a5965cef7551da34aef5cec47f46e97b6d9;p=linux-beck.git [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 477eaa2fcf6a..12dfdcfbee3d 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); } }