linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Check for Null return of function of affs_bread  in function affs_truncate
@ 2014-06-18 22:08 Nicholas Krause
  2014-06-19  5:21 ` Dan Carpenter
  0 siblings, 1 reply; 12+ messages in thread
From: Nicholas Krause @ 2014-06-18 22:08 UTC (permalink / raw)
  To: akpm
  Cc: viro, fabf, kirill.shutemov, dan.carpenter, linux-fsdevel,
	linux-kernel

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

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2014-07-13  6:18 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-18 22:08 [PATCH] Check for Null return of function of affs_bread in function affs_truncate Nicholas Krause
2014-06-19  5:21 ` Dan Carpenter
2014-06-20 16:30   ` Nick Krause
2014-06-20 23:59     ` Thomas Gleixner
2014-06-21  2:25       ` Nick Krause
2014-06-21  2:38         ` Andrew Morton
2014-06-21  2:55           ` Nick Krause
2014-06-21  3:09             ` Andrew Morton
2014-06-21  3:20               ` Nick Krause
2014-06-22 19:12       ` Al Viro
2014-07-11 15:05       ` Dan Carpenter
2014-07-13  6:18         ` Nick Krause

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).