From: Ryusuke Konishi Date: Sat, 22 Aug 2009 10:10:07 +0000 (+0900) Subject: nilfs2: fix ignored error code in __nilfs_read_inode() X-Git-Tag: 2.1b_release~11474^2~20 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1b2f5a641bca91966fd91dc489238068a0ab4b69;p=platform%2Fkernel%2Fkernel-mfld-blackbay.git 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: Ryusuke Konishi --- diff --git a/fs/nilfs2/inode.c b/fs/nilfs2/inode.c index fe9d8f2..807e584 100644 --- a/fs/nilfs2/inode.c +++ b/fs/nilfs2/inode.c @@ -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)) {