Signed-off-by: Nicholas Krause <xerofo...@gmail.com>
---
 fs/affs/file.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/fs/affs/file.c b/fs/affs/file.c
index a7fe57d..a227cec 100644
--- a/fs/affs/file.c
+++ b/fs/affs/file.c
@@ -923,6 +923,8 @@ affs_truncate(struct inode *inode)
 
        while (ext_key) {
                ext_bh = affs_bread(sb, ext_key);
+               if (!ext_bh)
+                       goto err;
                size = AFFS_SB(sb)->s_hashsize;
                if (size > blkcnt - blk)
                        size = blkcnt - blk;
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to