add error checking for ext2 superblock read
This commit is contained in:
parent
2e438081cf
commit
f8ea51441e
3 changed files with 20 additions and 0 deletions
|
|
@ -9,6 +9,10 @@ static int ext2_read_super(struct block_device *bdev, struct ext2_superblock *sb
|
|||
if (!buf)
|
||||
return -1;
|
||||
|
||||
#ifdef KDEBUG
|
||||
kprintf(LOG_DEBUG "Reading superblock from device %s, start_lba: %X\n", bdev->name, bdev->lba_start);
|
||||
#endif
|
||||
|
||||
int ret = block_read(bdev, buf, 2, 2);
|
||||
if (ret < 0) {
|
||||
kfree(buf);
|
||||
|
|
|
|||
2
fs/vfs.c
Normal file
2
fs/vfs.c
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
/* SDPX-License-Identifier: GPL-2.0-only */
|
||||
|
||||
Loading…
Reference in a new issue