[PATCH 2/2] ovl: use kernel facility for updating access time
From: Quorum Laval
Date: Tue Nov 15 2016 - 11:55:23 EST
Use fsstack_copy_attr_atime() instead of direct assignement.
Signed-off-by: Quorum Laval <quorum.laval@xxxxxxxxx>
---
fs/overlayfs/inode.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/overlayfs/inode.c b/fs/overlayfs/inode.c
index 540caa6..083cbdb 100644
--- a/fs/overlayfs/inode.c
+++ b/fs/overlayfs/inode.c
@@ -329,7 +329,7 @@ int ovl_update_time(struct inode *inode, struct timespec *ts, int flags)
ovl_path_upper(alias, &upperpath);
if (upperpath.dentry) {
touch_atime(&upperpath);
- inode->i_atime = d_inode(upperpath.dentry)->i_atime;
+ fsstack_copy_attr_atime(inode, d_inode(upperpath.dentry));
}
dput(alias);
--
2.7.4