summaryrefslogtreecommitdiffstats
path: root/fs/jbd2
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2023-09-07 09:40:07 -0400
committerTheodore Ts'o <tytso@mit.edu>2023-09-07 15:16:49 -0400
commitf94cf2206b066bd6d761d3347fd35f77b828c376 (patch)
tree4ea354425663f47fb1d3145675bea1b914b5d530 /fs/jbd2
parent768d612f79822d30a1e7d132a4d4b05337ce42ec (diff)
downloadlinux-f94cf2206b066bd6d761d3347fd35f77b828c376.tar.gz
linux-f94cf2206b066bd6d761d3347fd35f77b828c376.tar.bz2
linux-f94cf2206b066bd6d761d3347fd35f77b828c376.zip
buffer: Make bh_offset() work for compound pages
If the buffer pointed to by the buffer_head is part of a compound page, bh_offset() assumes that b_page is the precise page that contains the data. A recent change to jbd2 inadvertently violated that assumption. By using page_size(), we support both b_page being set to the head page (as page_size() will return the size of the entire folio) and the precise page (as it will return PAGE_SIZE for a tail page). Fixes: 8147c4c4546f ("jbd2: use a folio in jbd2_journal_write_metadata_buffer()") Reported-by: Zorro Lang <zlang@kernel.org> Tested-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com> Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Diffstat (limited to 'fs/jbd2')
0 files changed, 0 insertions, 0 deletions