Whamcloud - gitweb
LU-6210 utils: Use C99 struct initializers in lfs_setquota()
[fs/lustre-release.git] / lustre / quota / qmt_handler.c
index 9fda736..e0c99ad 100644 (file)
@@ -99,7 +99,8 @@ static int qmt_set(const struct lu_env *env, struct qmt_device *qmt,
        struct qmt_thread_info  *qti = qmt_info(env);
        struct lquota_entry     *lqe;
        struct thandle          *th = NULL;
-       __u64                    ver, now;
+       time64_t now;
+       __u64                    ver;
        bool                     dirtied = false;
        int                      rc = 0;
        ENTRY;
@@ -115,7 +116,7 @@ static int qmt_set(const struct lu_env *env, struct qmt_device *qmt,
        if (IS_ERR(th))
                GOTO(out_nolock, rc = PTR_ERR(th));
 
-       now = cfs_time_current_sec();
+       now = ktime_get_real_seconds();
 
        lqe_write_lock(lqe);
        LQUOTA_DEBUG(lqe, "changing quota settings valid:%x hard:%llu soft:"
@@ -407,7 +408,7 @@ int qmt_dqacq0(const struct lu_env *env, struct lquota_entry *lqe,
        slv_granted_bck = slv_granted;
 
        /* record current time for soft limit & grace time management */
-       now = (__u64)cfs_time_current_sec();
+       now = ktime_get_real_seconds();
 
        if (req_is_rel(qb_flags)) {
                /* Slave would like to release quota space */