Commit a8cdf0ff authored by Matthew Wilcox (Oracle)'s avatar Matthew Wilcox (Oracle) Committed by Kent Overstreet

bcachefs: Do not check folio_has_private()

folio_has_private() is an attractive nuisance; filesystem authors
generally don't realise that it actually checks two flags (one of which
is never set by bcachefs).  There's no need to check the private flag at
all; for folios owned by bcachefs, we know that folio->private is NULL
when the private flag is clear and non-NULL when the private flag is set.
Signed-off-by: default avatarMatthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent fdbc9c39
...@@ -99,9 +99,7 @@ static inline void bch2_folio_release(struct folio *folio) ...@@ -99,9 +99,7 @@ static inline void bch2_folio_release(struct folio *folio)
static inline struct bch_folio *__bch2_folio(struct folio *folio) static inline struct bch_folio *__bch2_folio(struct folio *folio)
{ {
return folio_has_private(folio) return folio_get_private(folio);
? (struct bch_folio *) folio_get_private(folio)
: NULL;
} }
static inline struct bch_folio *bch2_folio(struct folio *folio) static inline struct bch_folio *bch2_folio(struct folio *folio)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment