staging: lustre: Fix do not use C99 // comments in lcommon_cl.c
[firefly-linux-kernel-4.4.55.git] / drivers / staging / lustre / lustre / lclient / lcommon_cl.c
index e60c04d5393abaf6bf51ac3834adaf274d432d45..94b164127e0cb2ad82e0cf8987c56f07cfbc3389 100644 (file)
@@ -79,27 +79,27 @@ static struct lu_kmem_descr ccc_caches[] = {
        {
                .ckd_cache = &ccc_lock_kmem,
                .ckd_name  = "ccc_lock_kmem",
-               .ckd_size  = sizeof (struct ccc_lock)
+               .ckd_size  = sizeof(struct ccc_lock)
        },
        {
                .ckd_cache = &ccc_object_kmem,
                .ckd_name  = "ccc_object_kmem",
-               .ckd_size  = sizeof (struct ccc_object)
+               .ckd_size  = sizeof(struct ccc_object)
        },
        {
                .ckd_cache = &ccc_thread_kmem,
                .ckd_name  = "ccc_thread_kmem",
-               .ckd_size  = sizeof (struct ccc_thread_info),
+               .ckd_size  = sizeof(struct ccc_thread_info),
        },
        {
                .ckd_cache = &ccc_session_kmem,
                .ckd_name  = "ccc_session_kmem",
-               .ckd_size  = sizeof (struct ccc_session)
+               .ckd_size  = sizeof(struct ccc_session)
        },
        {
                .ckd_cache = &ccc_req_kmem,
                .ckd_name  = "ccc_req_kmem",
-               .ckd_size  = sizeof (struct ccc_req)
+               .ckd_size  = sizeof(struct ccc_req)
        },
        {
                .ckd_cache = NULL
@@ -162,7 +162,7 @@ struct lu_context_key ccc_session_key = {
 
 
 /* type constructor/destructor: ccc_type_{init,fini,start,stop}(). */
-// LU_TYPE_INIT_FINI(ccc, &ccc_key, &ccc_session_key);
+/* LU_TYPE_INIT_FINI(ccc, &ccc_key, &ccc_session_key); */
 
 int ccc_device_init(const struct lu_env *env, struct lu_device *d,
                           const char *name, struct lu_device *next)
@@ -1006,6 +1006,12 @@ again:
        cl_io_fini(env, io);
        if (unlikely(io->ci_need_restart))
                goto again;
+       /* HSM import case: file is released, cannot be restored
+        * no need to fail except if restore registration failed
+        * with -ENODATA */
+       if (result == -ENODATA && io->ci_restore_needed &&
+           io->ci_result != -ENODATA)
+               result = 0;
        cl_env_put(env, &refcheck);
        return result;
 }