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

affs: testing the wrong variable

The intent was to verify that bh = affs_bread_ino(...) returned a valid
pointer. We checked "ext_bh" earlier in the function and it's valid
here.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

authored by

Dan Carpenter and committed by
Al Viro
0e45b67d 7e360c38

+2 -2
+2 -2
fs/affs/file.c
··· 894 894 if (AFFS_SB(sb)->s_flags & SF_OFS) { 895 895 struct buffer_head *bh = affs_bread_ino(inode, last_blk, 0); 896 896 u32 tmp; 897 - if (IS_ERR(ext_bh)) { 897 + if (IS_ERR(bh)) { 898 898 affs_warning(sb, "truncate", "unexpected read error for last block %u (%d)", 899 - ext, PTR_ERR(ext_bh)); 899 + ext, PTR_ERR(bh)); 900 900 return; 901 901 } 902 902 tmp = be32_to_cpu(AFFS_DATA_HEAD(bh)->next);