mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 17:47:41 +02:00
xfs: abort mount if xfs_fs_reserve_ag_blocks fails
xfs_mountfs currently ignores all errors from xfs_fs_reserve_ag_blocks,
which can lead to the mount path continuing on corruption errors.
Fix the check to only ignore -ENOSPC as in other callers, and unwind for
all other errors.
Fixes: 81ed94751b ("xfs: fix log intent recovery ENOSPC shutdowns when inactivating inodes")
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
This commit is contained in:
parent
2fa29c1a16
commit
8070a50b88
|
|
@ -1149,9 +1149,12 @@ xfs_mountfs(
|
|||
* blocks.
|
||||
*/
|
||||
error = xfs_fs_reserve_ag_blocks(mp);
|
||||
if (error && error == -ENOSPC)
|
||||
if (error) {
|
||||
if (error != -ENOSPC)
|
||||
goto out_rtunmount;
|
||||
xfs_warn(mp,
|
||||
"ENOSPC reserving per-AG metadata pool, log recovery may fail.");
|
||||
"ENOSPC reserving per-AG metadata pool, log recovery may fail.");
|
||||
}
|
||||
error = xfs_log_mount_finish(mp);
|
||||
xfs_fs_unreserve_ag_blocks(mp);
|
||||
if (error) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user