From 37ceb7d5c59901e8e05b3d3acfe440b381e9e82f Mon Sep 17 00:00:00 2001 From: Jian Yu Date: Mon, 11 Mar 2024 23:42:56 -0700 Subject: [PATCH] LU-17243 pcc: replace i_mtime with inode_get_mtime() This patch replaces i_mtime with inode_get_mtime(), and i_mtime.tv_sec with inode_get_mtime_sec() in pcc codes. Test-Parameters: trivial testlist=sanity-pcc Fixes: 3c586ca ("LU-17243 build: compatibility updates for kernel 6.6") Change-Id: I756451ac9d38c3b434bb511b33d5d891b2b914ae Signed-off-by: Jian Yu Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/54357 Reviewed-by: Qian Yingjin Reviewed-by: Feng Lei Reviewed-by: Andreas Dilger Tested-by: jenkins Tested-by: Maloo --- lustre/llite/pcc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lustre/llite/pcc.c b/lustre/llite/pcc.c index ea77334..ec3a0ae 100644 --- a/lustre/llite/pcc.c +++ b/lustre/llite/pcc.c @@ -2064,7 +2064,7 @@ static int pcc_try_readonly_open_attach(struct inode *inode, struct file *file, item.pm_projid = ll_i2info(inode)->lli_projid; item.pm_name = &dentry->d_name; item.pm_size = ll_i2info(inode)->lli_lazysize; - item.pm_mtime = inode->i_mtime.tv_sec; + item.pm_mtime = inode_get_mtime_sec(inode); dataset = pcc_dataset_match_get(&ll_i2sbi(inode)->ll_pcc_super, LU_PCC_READONLY, &item); if (dataset == NULL) @@ -3622,7 +3622,7 @@ int pcc_inode_reset_iattr(struct inode *lustre_inode, struct dentry *dentry, attr.ia_uid = uid; attr.ia_gid = gid; attr.ia_size = size; - attr.ia_mtime = lustre_inode->i_mtime; + attr.ia_mtime = inode_get_mtime(lustre_inode); inode_lock(inode); rc = notify_change(&nop_mnt_idmap, dentry, &attr, NULL); -- 1.8.3.1