diff options
| author | Ingo Molnar <mingo@kernel.org> | 2023-10-07 12:32:24 +0300 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2023-10-07 12:32:24 +0300 |
| commit | 8db30574db25fa20cdcfa03e374edc3f8b8dc301 (patch) | |
| tree | 0b54686593694b68fb0537197eaa4bec7a44985d /include/linux/buffer_head.h | |
| parent | d4d6596b43868a1e05fe5b047e73c3aff96444c6 (diff) | |
| parent | 9e0bc36ab07c550d791bf17feeb479f1dfc42d89 (diff) | |
| download | linux-8db30574db25fa20cdcfa03e374edc3f8b8dc301.tar.xz | |
Merge branch 'sched/urgent' into sched/core, to pick up fixes and refresh the branch
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include/linux/buffer_head.h')
| -rw-r--r-- | include/linux/buffer_head.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h index 4ede47649a81..44e9de51eedf 100644 --- a/include/linux/buffer_head.h +++ b/include/linux/buffer_head.h @@ -171,7 +171,10 @@ static __always_inline int buffer_uptodate(const struct buffer_head *bh) return test_bit_acquire(BH_Uptodate, &bh->b_state); } -#define bh_offset(bh) ((unsigned long)(bh)->b_data & ~PAGE_MASK) +static inline unsigned long bh_offset(const struct buffer_head *bh) +{ + return (unsigned long)(bh)->b_data & (page_size(bh->b_page) - 1); +} /* If we *know* page->private refers to buffer_heads */ #define page_buffers(page) \ |
