From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicholas Krause Subject: [PATCH] Check for Null return of function of affs_bread in function affs_truncate Date: Wed, 18 Jun 2014 18:08:05 -0400 Message-ID: <1403129285-5038-1-git-send-email-xerofoify@gmail.com> Cc: viro@zeniv.linux.org.uk, fabf@skynet.be, kirill.shutemov@linux.intel.com, dan.carpenter@oracle.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org To: akpm@linux-foundation.org Return-path: Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org Signed-off-by: Nicholas Krause --- fs/affs/file.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/affs/file.c b/fs/affs/file.c index a7fe57d..f26482d 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) + return; size = AFFS_SB(sb)->s_hashsize; if (size > blkcnt - blk) size = blkcnt - blk; -- 1.9.1