Skip to content
Commit 6c7a120a authored by Aditya Kali's avatar Aditya Kali Committed by Theodore Ts'o
Browse files

ext4: Adding error check after calling ext4_mb_regular_allocator()



If the bitmap block on disk is bad, ext4_mb_load_buddy() returns an
error. This error is returned to the caller,
ext4_mb_regular_allocator() and then to ext4_mb_new_blocks().  But
ext4_mb_new_blocks() did not check for the return value of
ext4_mb_regular_allocator() and would repeatedly try to load the
bitmap block. The fix simply catches the return value and exits out of
the 'repeat' loop after cleanup.

We also take the opportunity to clean up the error handling in
ext4_mb_new_blocks().

Google-Bug-Id: 2853530

Signed-off-by: default avatarAditya Kali <adityakali@google.com>
Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
parent 56d35a4c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment