diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2023-09-17 20:33:53 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2023-09-17 20:33:53 +0300 |
commit | 3fde3003cab845c124253c0a42eb0cf70220c5da (patch) | |
tree | 753939342009369e94684adb34765f83df6e10a4 /include | |
parent | f0b0d403eabbe135d8dbb40ad5e41018947d336c (diff) | |
parent | 7fda67e8c3ab6069f75888f67958a6d30454a9f6 (diff) | |
download | linux-3fde3003cab845c124253c0a42eb0cf70220c5da.tar.xz |
Merge tag 'ext4_for_linus-6.6-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4
Pull ext4 fixes from Ted Ts'o:
"Regression and bug fixes for ext4"
* tag 'ext4_for_linus-6.6-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
ext4: fix rec_len verify error
ext4: do not let fstrim block system suspend
ext4: move setting of trimmed bit into ext4_try_to_trim_range()
jbd2: Fix memory leak in journal_init_common()
jbd2: Remove page size assumptions
buffer: Make bh_offset() work for compound pages
Diffstat (limited to 'include')
-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) \ |