Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

fs/romfs: correct error-handling code

romfs_fill_super() assumes that romfs_iget() returns NULL when
it fails. romfs_iget() actually returns ERR_PTR(-ve) in that
case...

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

authored by

Julia Lawall and committed by
Al Viro
88a0a53d f8439806

+1 -1
+1 -1
fs/romfs/super.c
··· 528 528 pos = (ROMFH_SIZE + len + 1 + ROMFH_PAD) & ROMFH_MASK; 529 529 530 530 root = romfs_iget(sb, pos); 531 - if (!root) 531 + if (IS_ERR(root)) 532 532 goto error; 533 533 534 534 sb->s_root = d_alloc_root(root);