diff options
| author | Yongpeng Yang <[email protected]> | 2025-11-04 12:50:10 +0000 |
|---|---|---|
| committer | Christian Brauner <[email protected]> | 2025-11-05 13:00:16 +0000 |
| commit | 8637fa89e678422995301ddb20b74190dffcccee (patch) | |
| tree | f1e06099ad1572289b32baa951a5b847aaca2c57 /lib/mpi/mpi-mpow.c | |
| parent | xfs: check the return value of sb_min_blocksize() in xfs_fs_fill_super (diff) | |
| download | kernel-8637fa89e678422995301ddb20b74190dffcccee.tar.gz kernel-8637fa89e678422995301ddb20b74190dffcccee.zip | |
block: add __must_check attribute to sb_min_blocksize()
When sb_min_blocksize() returns 0 and the return value is not checked,
it may lead to a situation where sb->s_blocksize is 0 when
accessing the filesystem super block. After commit a64e5a596067bd
("bdev: add back PAGE_SIZE block size validation for
sb_set_blocksize()"), this becomes more likely to happen when the
block device’s logical_block_size is larger than PAGE_SIZE and the
filesystem is unformatted. Add the __must_check attribute to ensure
callers always check the return value.
Cc: [email protected] # v6.15
Suggested-by: Matthew Wilcox <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Reviewed-by: Jan Kara <[email protected]>
Signed-off-by: Yongpeng Yang <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Christian Brauner <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-mpow.c')
0 files changed, 0 insertions, 0 deletions
