aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/lustre/lustre/include/lustre_capa.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging/lustre/lustre/include/lustre_capa.h')
-rw-r--r--drivers/staging/lustre/lustre/include/lustre_capa.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/staging/lustre/lustre/include/lustre_capa.h b/drivers/staging/lustre/lustre/include/lustre_capa.h
index d77bffc0b59d..ab6b9ea98a70 100644
--- a/drivers/staging/lustre/lustre/include/lustre_capa.h
+++ b/drivers/staging/lustre/lustre/include/lustre_capa.h
@@ -50,7 +50,7 @@
* capability
*/
#include <linux/crypto.h>
-#include <lustre/lustre_idl.h>
+#include "lustre/lustre_idl.h"
#define CAPA_TIMEOUT 1800 /* sec, == 30 min */
#define CAPA_KEY_TIMEOUT (24 * 60 * 60) /* sec, == 1 days */
@@ -82,7 +82,7 @@ struct obd_capa {
struct lustre_capa c_capa; /* capa */
atomic_t c_refc; /* ref count */
- cfs_time_t c_expiry; /* jiffies */
+ unsigned long c_expiry; /* jiffies */
spinlock_t c_lock; /* protect capa content */
int c_site;
@@ -167,7 +167,7 @@ do { \
#define DEBUG_CAPA_KEY(level, k, fmt, args...) \
do { \
-CDEBUG(level, fmt " capability key@%p seq "LPU64" keyid %u\n", \
+CDEBUG(level, fmt " capability key@%p seq %llu keyid %u\n", \
##args, k, capa_key_seq(k), capa_key_keyid(k)); \
} while (0)
@@ -266,20 +266,20 @@ static inline __u64 capa_open_opc(int mode)
static inline void set_capa_expiry(struct obd_capa *ocapa)
{
- cfs_time_t expiry = cfs_time_sub((cfs_time_t)ocapa->c_capa.lc_expiry,
- cfs_time_current_sec());
+ unsigned long expiry = cfs_time_sub((unsigned long)ocapa->c_capa.lc_expiry,
+ get_seconds());
ocapa->c_expiry = cfs_time_add(cfs_time_current(),
cfs_time_seconds(expiry));
}
static inline int capa_is_expired_sec(struct lustre_capa *capa)
{
- return (capa->lc_expiry - cfs_time_current_sec() <= 0);
+ return (capa->lc_expiry - get_seconds() <= 0);
}
static inline int capa_is_expired(struct obd_capa *ocapa)
{
- return cfs_time_beforeq(ocapa->c_expiry, cfs_time_current());
+ return time_before_eq(ocapa->c_expiry, cfs_time_current());
}
static inline int capa_opc_supported(struct lustre_capa *capa, __u64 opc)