]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ufs: fix ufs_read_cylinder() failure handling
authorAl Viro <viro@zeniv.linux.org.uk>
Wed, 13 Dec 2023 16:20:44 +0000 (11:20 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Fri, 18 Oct 2024 21:35:31 +0000 (17:35 -0400)
commit0bfd3e1078c537cd66a8addb1c01835de4234a4c
treef4f0059f52cb86d4a24b956d04fe2139097df722
parent7f71d6e3462bde7db08058e749667b5d3235fad1
ufs: fix ufs_read_cylinder() failure handling

1) ufs_load_cylinder() should return NULL on ufs_read_cylinder() failures.
ufs_error() is not enough.  As it is, IO failure on attempt to read a part
of cylinder group metadata is likely to end up with an oops.

2) we drop the wrong buffer heads when undoing sb_bread() on IO failure
halfway through the read - we need to brelse() what we've got from
sb_bread(), TYVM...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/ufs/cylinder.c