Whamcloud - gitweb
LU-12930 various: use schedule_timeout_*interruptible
[fs/lustre-release.git] / lustre / osp / osp_internal.h
index 64ef6e3..c78694d 100644 (file)
@@ -177,7 +177,6 @@ struct osp_device {
        struct osp_rpc_lock              opd_rpc_lock;
        struct obd_device               *opd_obd;
        struct obd_export               *opd_exp;
-       struct obd_uuid                  opd_cluuid;
        struct obd_connect_data         *opd_connect_data;
        int                              opd_connects;
        /* connection status. */
@@ -432,15 +431,7 @@ extern struct lu_context_key osp_thread_key;
 
 static inline struct osp_thread_info *osp_env_info(const struct lu_env *env)
 {
-       struct osp_thread_info *info;
-
-       info = lu_context_key_get(&env->le_ctx, &osp_thread_key);
-       if (info == NULL) {
-               lu_env_refill((struct lu_env *)env);
-               info = lu_context_key_get(&env->le_ctx, &osp_thread_key);
-       }
-       LASSERT(info);
-       return info;
+       return lu_env_info(env, &osp_thread_key);
 }
 
 struct osp_txn_info {
@@ -569,7 +560,7 @@ static inline void osp_get_rpc_lock(struct osp_device *osp)
         */
        if (unlikely(lck->rpcl_fakes)) {
                mutex_unlock(&lck->rpcl_mutex);
-               schedule_timeout(cfs_time_seconds(1) / 4);
+               schedule_timeout_uninterruptible(cfs_time_seconds(1) / 4);
 
                goto again;
        }
@@ -900,7 +891,7 @@ int osp_sync_add_commit_cb_1s(const struct lu_env *env, struct osp_device *d,
                              struct thandle *th);
 
 /* lwp_dev.c */
-extern struct obd_ops lwp_obd_device_ops;
+extern const struct obd_ops lwp_obd_device_ops;
 extern struct lu_device_type lwp_device_type;
 
 static inline struct lu_device *osp2top(const struct osp_device *osp)