Whamcloud - gitweb
LU-17402 kernel: RHEL 8.10 client and server support
[fs/lustre-release.git] / lustre / obdclass / obdo.c
index 311b464..35f707f 100644 (file)
@@ -27,7 +27,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lustre/obdclass/obdo.c
  *
@@ -39,9 +38,8 @@
 #define DEBUG_SUBSYSTEM S_CLASS
 
 #include <linux/user_namespace.h>
-#ifdef HAVE_UIDGID_HEADER
-# include <linux/uidgid.h>
-#endif
+#include <linux/uidgid.h>
+
 #include <obd_class.h>
 #include <lustre_obdo.h>
 
@@ -70,20 +68,20 @@ void obdo_from_inode(struct obdo *dst, struct inode *src, u64 valid)
        u64 newvalid = 0;
 
        if (valid & (OBD_MD_FLCTIME | OBD_MD_FLMTIME))
-               CDEBUG(D_INODE, "valid %#llx, new time %lu/%lu\n",
-                       valid, LTIME_S(src->i_mtime),
-                       LTIME_S(src->i_ctime));
+               CDEBUG(D_INODE, "valid %#llx, new time %lld/%lld\n",
+                      valid, (s64) inode_get_mtime_sec(src),
+                      (s64) inode_get_ctime_sec(src));
 
        if (valid & OBD_MD_FLATIME) {
-               dst->o_atime = LTIME_S(src->i_atime);
+               dst->o_atime = inode_get_atime_sec(src);
                newvalid |= OBD_MD_FLATIME;
        }
        if (valid & OBD_MD_FLMTIME) {
-               dst->o_mtime = LTIME_S(src->i_mtime);
+               dst->o_mtime = inode_get_mtime_sec(src);
                newvalid |= OBD_MD_FLMTIME;
        }
        if (valid & OBD_MD_FLCTIME) {
-               dst->o_ctime = LTIME_S(src->i_ctime);
+               dst->o_ctime = inode_get_ctime_sec(src);
                newvalid |= OBD_MD_FLCTIME;
        }
        if (valid & OBD_MD_FLSIZE) {
@@ -166,9 +164,6 @@ EXPORT_SYMBOL(obdo_cpy_md);
 void obdo_to_ioobj(const struct obdo *oa, struct obd_ioobj *ioobj)
 {
        ioobj->ioo_oid = oa->o_oi;
-       if (unlikely(!(oa->o_valid & OBD_MD_FLGROUP)))
-               ostid_set_seq_mdt0(&ioobj->ioo_oid);
-
        /*
         * Since 2.4 this does not contain o_mode in the low 16 bits.
         * Instead, it holds (bd_md_max_brw - 1) for multi-bulk BRW RPCs