lkml.org 
[lkml]   [2014]   [Jun]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] Check for Null return of function of affs_bread in function affs_truncate
Date
Signed-off-by: Nicholas Krause <xerofoify@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..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


\
 
 \ /
  Last update: 2014-06-20 05:21    [W:0.066 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site