Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1b2f5a64 authored by Ryusuke Konishi's avatar Ryusuke Konishi
Browse files

nilfs2: fix ignored error code in __nilfs_read_inode()



The __nilfs_read_inode function is ignoring the error code returned
from nilfs_read_inode_common(), and wrongly delivers a success code
(zero) when it escapes from the function in erroneous cases.

This adds the missing error handling.

Signed-off-by: default avatarRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
parent 74fca6a4
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -430,7 +430,8 @@ static int __nilfs_read_inode(struct super_block *sb, unsigned long ino,

	raw_inode = nilfs_ifile_map_inode(sbi->s_ifile, ino, bh);

	if (nilfs_read_inode_common(inode, raw_inode))
	err = nilfs_read_inode_common(inode, raw_inode);
	if (err)
		goto failed_unmap;

	if (S_ISREG(inode->i_mode)) {