X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=libcfs%2Finclude%2Flibcfs%2Flibcfs_hash.h;h=bdf3cdd37754f6d63e603c63f4fa57e47062d227;hp=64feebfe3747be3e85c3729d9e582035e1994c44;hb=HEAD;hpb=ce404bd07c37f45d8c8fe0cf3e3ecf6e18740f43 diff --git a/libcfs/include/libcfs/libcfs_hash.h b/libcfs/include/libcfs/libcfs_hash.h index 64feebf..6fe31a6 100644 --- a/libcfs/include/libcfs/libcfs_hash.h +++ b/libcfs/include/libcfs/libcfs_hash.h @@ -39,6 +39,7 @@ #include #include +#include #include /** disable debug */ @@ -250,8 +251,8 @@ struct cfs_hash { /** workitem to output max depth */ struct work_struct hs_dep_work; #endif - /** name of htable */ - char hs_name[0]; + /** name of htable */ + char hs_name[]; }; struct cfs_hash_lock_ops { @@ -610,10 +611,10 @@ void cfs_hash_bd_move_locked(struct cfs_hash *hs, struct cfs_hash_bd *bd_old, static inline int cfs_hash_bd_dec_and_lock(struct cfs_hash *hs, struct cfs_hash_bd *bd, - atomic_t *condition) + refcount_t *condition) { LASSERT(cfs_hash_with_spin_bktlock(hs)); - return atomic_dec_and_lock(condition, &bd->bd_bucket->hsb_lock.spin); + return refcount_dec_and_lock(condition, &bd->bd_bucket->hsb_lock.spin); } static inline struct hlist_head *