From 0fde85bf6c3c952b85b8044af6ce2cedf818f049 Mon Sep 17 00:00:00 2001 From: adilger Date: Sat, 19 Jul 2003 06:09:32 +0000 Subject: [PATCH] Fix mtime corruption bug 1570. Was checking wrong valid flags, after setting them for truncates. --- lustre/llite/llite_lib.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lustre/llite/llite_lib.c b/lustre/llite/llite_lib.c index 82392f1..821e6fe 100644 --- a/lustre/llite/llite_lib.c +++ b/lustre/llite/llite_lib.c @@ -582,15 +582,15 @@ int ll_setattr_raw(struct inode *inode, struct iattr *attr) } /* We mark all of the fields "set" so MDS/OST does not re-set them */ - if (ia_valid & ATTR_CTIME) { + if (attr->ia_valid & ATTR_CTIME) { attr->ia_ctime = now; attr->ia_valid |= ATTR_CTIME_SET; } - if (!(ia_valid & ATTR_ATIME_SET) && (ia_valid & ATTR_ATIME)) { + if (!(ia_valid & ATTR_ATIME_SET) && (attr->ia_valid & ATTR_ATIME)) { attr->ia_atime = now; attr->ia_valid |= ATTR_ATIME_SET; } - if (!(ia_valid & ATTR_MTIME_SET) && (ia_valid & ATTR_MTIME)) { + if (!(ia_valid & ATTR_MTIME_SET) && (attr->ia_valid & ATTR_MTIME)) { attr->ia_mtime = now; attr->ia_valid |= ATTR_MTIME_SET; } -- 1.8.3.1