diff options
| author | Christoph Hellwig <hch@lst.de> | 2026-05-11 10:16:46 +0300 |
|---|---|---|
| committer | Christian Brauner <brauner@kernel.org> | 2026-05-21 14:39:35 +0300 |
| commit | 2430e3380936df0b648af720cae624eef035a2d1 (patch) | |
| tree | de2950c6c7465941297eb1c598585d7135a28807 | |
| parent | ccde023e6aea3c31fb2643cb76a6205bc343f979 (diff) | |
| download | linux-2430e3380936df0b648af720cae624eef035a2d1.tar.xz | |
bfs: handle set_blocksize failures
bfs uses buffer_heads, which don't handle block size > PAGE_SIZE well.
Without this, mounting will hit the
BUG_ON(offset >= folio_size(folio));
in folio_set_bh on the first __bread_gfp call.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://patch.msgid.link/20260511071701.2456211-2-hch@lst.de
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
| -rw-r--r-- | fs/bfs/inode.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/bfs/inode.c b/fs/bfs/inode.c index 19e49c8cf750..9c3e90390824 100644 --- a/fs/bfs/inode.c +++ b/fs/bfs/inode.c @@ -346,7 +346,8 @@ static int bfs_fill_super(struct super_block *s, struct fs_context *fc) s->s_time_min = 0; s->s_time_max = U32_MAX; - sb_set_blocksize(s, BFS_BSIZE); + if (!sb_set_blocksize(s, BFS_BSIZE)) + goto out; sbh = sb_bread(s, 0); if (!sbh) |
