]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
bcachefs: Kill ptr_bucket_mark()
authorKent Overstreet <kent.overstreet@gmail.com>
Fri, 24 Dec 2021 08:08:06 +0000 (03:08 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:19 +0000 (17:09 -0400)
Only used in one place, we can just delete it.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
fs/bcachefs/buckets.h

index cc3e8b9b8fafa48f688570bc6721e4a6f4693b5d..afa29d6c5a73a8bc1356138aed8faff76075f6d4 100644 (file)
@@ -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 */