Skip to content
Commit 631abc6e authored by John L. Hammond's avatar John L. Hammond Committed by Greg Kroah-Hartman
Browse files

staging/lustre/obdclass: use a dummy structure for lu_ref_link

Move the definition of struct lu_ref_link to lu_ref.h.  If USE_LU_REF
is not defined then define it to be the empty struct.  Change the
return type of lu_ref_add() and lu_ref_add_atomic() to void.  Add
lu_ref_add_at() taking same arguments as lu_ref_add() togerther with a
pointer to a struct lu_ref_link and returning void.  Adjust all
structures containing a lu_ref_link pointer to contain a struct
lu_ref_link instead.  Use lu_ref_add_at() and lu_ref_del_at() to
handle embedded lu_ref_links.

[Original patch mainly changes lu_ref.[ch] but in upstream client we don't
have lu_ref code in the hope of moving to kobject refcounting. So the patch
only picks the other pieces of original patch, in order to keep code in
sync and make it easier to port future patches.]

Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3059
Lustre-change: http://review.whamcloud.com/5920


Signed-off-by: default avatarJohn L. Hammond <john.hammond@intel.com>
Reviewed-by: default avatarAlex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: default avatarJinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: default avatarMike Pershin <mike.pershin@intel.com>
Reviewed-by: default avatarOleg Drokin <oleg.drokin@intel.com>
Signed-off-by: default avatarPeng Tao <tao.peng@emc.com>
Signed-off-by: default avatarAndreas Dilger <andreas.dilger@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ae5ef67b
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment