Whamcloud - gitweb
LU-17243 pcc: replace i_mtime with inode_get_mtime()
authorJian Yu <yujian@whamcloud.com>
Tue, 12 Mar 2024 06:42:56 +0000 (23:42 -0700)
committerAndreas Dilger <adilger@whamcloud.com>
Sat, 16 Mar 2024 08:16:50 +0000 (08:16 +0000)
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 <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/54357
Reviewed-by: Qian Yingjin <qian@ddn.com>
Reviewed-by: Feng Lei <flei@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/llite/pcc.c

index ea77334..ec3a0ae 100644 (file)
@@ -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);