diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-07-06 22:47:42 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:10:06 -0400 |
commit | 73bd774d28d2b2e6a05c31bf7afb9247e02a8e49 (patch) | |
tree | 21ab80d4b966d92647ea178bc5707a8534e5d123 /fs/bcachefs/btree_locking.h | |
parent | 236b68da5017b5336b332f941323a5bc450594b3 (diff) | |
download | lwn-73bd774d28d2b2e6a05c31bf7afb9247e02a8e49.tar.gz lwn-73bd774d28d2b2e6a05c31bf7afb9247e02a8e49.zip |
bcachefs: Assorted sparse fixes
- endianness fixes
- mark some things static
- fix a few __percpu annotations
- fix silent enum conversions
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/btree_locking.h')
-rw-r--r-- | fs/bcachefs/btree_locking.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/bcachefs/btree_locking.h b/fs/bcachefs/btree_locking.h index 3b537e451d2c..78daa494c914 100644 --- a/fs/bcachefs/btree_locking.h +++ b/fs/bcachefs/btree_locking.h @@ -93,7 +93,7 @@ static inline void mark_btree_node_locked(struct btree_trans *trans, unsigned level, enum six_lock_type type) { - mark_btree_node_locked_noreset(path, level, type); + mark_btree_node_locked_noreset(path, level, (enum btree_node_locked_type) type); #ifdef CONFIG_BCACHEFS_LOCK_TIME_STATS path->l[level].lock_taken_time = local_clock(); #endif @@ -246,7 +246,7 @@ static inline bool btree_node_lock_increment(struct btree_trans *trans, trans_for_each_path(trans, path) if (&path->l[level].b->c == b && btree_node_locked_type(path, level) >= want) { - six_lock_increment(&b->lock, want); + six_lock_increment(&b->lock, (enum six_lock_type) want); return true; } @@ -266,7 +266,7 @@ static inline int btree_node_lock(struct btree_trans *trans, EBUG_ON(!(trans->paths_allocated & (1ULL << path->idx))); if (likely(six_trylock_type(&b->lock, type)) || - btree_node_lock_increment(trans, b, level, type) || + btree_node_lock_increment(trans, b, level, (enum btree_node_locked_type) type) || !(ret = btree_node_lock_nopath(trans, b, type, btree_path_ip_allocated(path)))) { #ifdef CONFIG_BCACHEFS_LOCK_TIME_STATS path->l[b->level].lock_taken_time = local_clock(); |