Whamcloud - gitweb
LU-13723 lustre: Convert ERR_PTR(PTR_ERR()) to ERR_CAST()
[fs/lustre-release.git] / lustre / obdclass / local_storage.h
index 9a7244e..63af194 100644 (file)
@@ -20,7 +20,7 @@
  * GPL HEADER END
  */
 /*
- * Copyright (c) 2012, Intel Corporation.
+ * Copyright (c) 2012, 2014, Intel Corporation.
  */
 /*
  * lustre/obdclass/local_storage.c
 struct ls_device {
        struct dt_device         ls_top_dev;
        /* all initialized ls_devices on this node linked by this */
-       cfs_list_t               ls_linkage;
+       struct list_head         ls_linkage;
        /* how many handle's reference this local storage */
        atomic_t                 ls_refcount;
        /* underlaying OSD device */
        struct dt_device        *ls_osd;
        /* list of all local OID storages */
-       cfs_list_t               ls_los_list;
+       struct list_head         ls_los_list;
        struct mutex             ls_los_mutex;
 };
 
 static inline struct ls_device *dt2ls_dev(struct dt_device *d)
 {
-       return container_of0(d, struct ls_device, ls_top_dev);
+       return container_of_safe(d, struct ls_device, ls_top_dev);
 }
 
 struct ls_object {
@@ -62,7 +62,7 @@ struct ls_object {
 
 static inline struct ls_object *lu2ls_obj(struct lu_object *o)
 {
-       return container_of0(o, struct ls_object, ls_obj.do_lu);
+       return container_of_safe(o, struct ls_object, ls_obj.do_lu);
 }
 
 static inline struct dt_object *ls_locate(const struct lu_env *env,