X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=drivers%2Fstaging%2Flustre%2Finclude%2Flinux%2Flibcfs%2Flibcfs_hash.h;h=b06505d8620d7de0becca75fb2604e59c46d01f4;hb=29323b3e6bc65d95e2ef5add5db332fcb41ff2e6;hp=98f5be243c8ece7af42641ef8d08a1761c1c6e26;hpb=7426d62871dafbeeed087d609c6469a515c88389;p=karo-tx-linux.git diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h b/drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h index 98f5be243c8e..b06505d8620d 100644 --- a/drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h +++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h @@ -81,10 +81,10 @@ struct cfs_hash_ops; struct cfs_hash_lock_ops; struct cfs_hash_hlist_ops; -typedef union { +union cfs_hash_lock { rwlock_t rw; /**< rwlock */ spinlock_t spin; /**< spinlock */ -} cfs_hash_lock_t; +}; /** * cfs_hash_bucket is a container of: @@ -98,7 +98,7 @@ typedef union { * - some extra bytes (caller can require it while creating hash) */ typedef struct cfs_hash_bucket { - cfs_hash_lock_t hsb_lock; /**< bucket lock */ + union cfs_hash_lock hsb_lock; /**< bucket lock */ __u32 hsb_count; /**< current entries */ __u32 hsb_version; /**< change version */ unsigned int hsb_index; /**< index of bucket */ @@ -213,7 +213,7 @@ enum cfs_hash_tag { typedef struct cfs_hash { /** serialize with rehash, or serialize all operations if * the hash-table has CFS_HASH_NO_BKTLOCK */ - cfs_hash_lock_t hs_lock; + union cfs_hash_lock hs_lock; /** hash operations */ struct cfs_hash_ops *hs_ops; /** hash lock operations */ @@ -276,13 +276,13 @@ typedef struct cfs_hash { typedef struct cfs_hash_lock_ops { /** lock the hash table */ - void (*hs_lock)(cfs_hash_lock_t *lock, int exclusive); + void (*hs_lock)(union cfs_hash_lock *lock, int exclusive); /** unlock the hash table */ - void (*hs_unlock)(cfs_hash_lock_t *lock, int exclusive); + void (*hs_unlock)(union cfs_hash_lock *lock, int exclusive); /** lock the hash bucket */ - void (*hs_bkt_lock)(cfs_hash_lock_t *lock, int exclusive); + void (*hs_bkt_lock)(union cfs_hash_lock *lock, int exclusive); /** unlock the hash bucket */ - void (*hs_bkt_unlock)(cfs_hash_lock_t *lock, int exclusive); + void (*hs_bkt_unlock)(union cfs_hash_lock *lock, int exclusive); } cfs_hash_lock_ops_t; typedef struct cfs_hash_hlist_ops {