diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2021-12-24 03:08:06 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:09:19 -0400 |
commit | 4b674b09a950fb20aa30e902331e4eba12059b80 (patch) | |
tree | 6692626e3089fe2d3dea92e11173ada1c1bd5afd /fs/bcachefs | |
parent | c64740ef27cfe2092e3a56509b3bf44e9b10ae49 (diff) | |
download | linux-4b674b09a950fb20aa30e902331e4eba12059b80.tar.gz linux-4b674b09a950fb20aa30e902331e4eba12059b80.tar.bz2 linux-4b674b09a950fb20aa30e902331e4eba12059b80.zip |
bcachefs: Kill ptr_bucket_mark()
Only used in one place, we can just delete it.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'fs/bcachefs')
-rw-r--r-- | fs/bcachefs/buckets.h | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/fs/bcachefs/buckets.h b/fs/bcachefs/buckets.h index cc3e8b9b8faf..afa29d6c5a73 100644 --- a/fs/bcachefs/buckets.h +++ b/fs/bcachefs/buckets.h @@ -91,18 +91,6 @@ static inline enum bch_data_type ptr_data_type(const struct bkey *k, return ptr->cached ? BCH_DATA_cached : BCH_DATA_user; } -static inline struct bucket_mark ptr_bucket_mark(struct bch_dev *ca, - const struct bch_extent_ptr *ptr) -{ - struct bucket_mark m; - - rcu_read_lock(); - m = READ_ONCE(PTR_BUCKET(ca, ptr, 0)->mark); - rcu_read_unlock(); - - return m; -} - static inline int gen_cmp(u8 a, u8 b) { return (s8) (a - b); @@ -122,7 +110,13 @@ static inline int gen_after(u8 a, u8 b) static inline u8 ptr_stale(struct bch_dev *ca, const struct bch_extent_ptr *ptr) { - return gen_after(ptr_bucket_mark(ca, ptr).gen, ptr->gen); + u8 ret; + + rcu_read_lock(); + ret = gen_after(PTR_BUCKET(ca, ptr, 0)->mark.gen, ptr->gen); + rcu_read_unlock(); + + return ret; } /* bucket gc marks */ |