From: Niu Yawei Date: Thu, 3 Nov 2016 01:24:54 +0000 (-0400) Subject: staging/lustre/llite: clear inode timestamps after losing UPDATE lock X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2d8c919e59df6a576d2c81fedc36d69dc7394645;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git staging/lustre/llite: clear inode timestamps after losing UPDATE lock Otherwise, those leftovers would interfere with new timestamps especially when the timestamps are set back in time on the other clients. Signed-off-by: Jinshan Xiong Signed-off-by: Niu Yawei Reviewed-on: http://review.whamcloud.com/22623 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8446 Reviewed-by: Bobi Jam Signed-off-by: Oleg Drokin Reviewed-by: James Simmons Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/lustre/lustre/llite/namei.c b/drivers/staging/lustre/lustre/llite/namei.c index 74d9b738034a..c268f32f73e4 100644 --- a/drivers/staging/lustre/lustre/llite/namei.c +++ b/drivers/staging/lustre/lustre/llite/namei.c @@ -251,6 +251,16 @@ int ll_md_blocking_ast(struct ldlm_lock *lock, struct ldlm_lock_desc *desc, PFID(ll_inode2fid(inode)), rc); } + if (bits & MDS_INODELOCK_UPDATE) { + struct ll_inode_info *lli = ll_i2info(inode); + + spin_lock(&lli->lli_lock); + LTIME_S(inode->i_mtime) = 0; + LTIME_S(inode->i_atime) = 0; + LTIME_S(inode->i_ctime) = 0; + spin_unlock(&lli->lli_lock); + } + if ((bits & MDS_INODELOCK_UPDATE) && S_ISDIR(inode->i_mode)) { struct ll_inode_info *lli = ll_i2info(inode);