linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Check for Null return of affs_bread in function affs_truncate
@ 2014-06-17 15:37 Nicholas Krause
  2014-06-17 19:48 ` Dan Carpenter
  0 siblings, 1 reply; 2+ messages in thread
From: Nicholas Krause @ 2014-06-17 15:37 UTC (permalink / raw)
  To: akpm
  Cc: viro, fabf, dan.carpenter, kirill.shutemov, 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..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

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

* Re: [PATCH] Check for Null return of affs_bread in function affs_truncate
  2014-06-17 15:37 [PATCH] Check for Null return of affs_bread in function affs_truncate Nicholas Krause
@ 2014-06-17 19:48 ` Dan Carpenter
  0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2014-06-17 19:48 UTC (permalink / raw)
  To: Nicholas Krause
  Cc: akpm, viro, fabf, kirill.shutemov, linux-fsdevel, linux-kernel

This doesn't compile at all.

regards,
dan carpenter

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

end of thread, other threads:[~2014-06-17 19:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-17 15:37 [PATCH] Check for Null return of affs_bread in function affs_truncate Nicholas Krause
2014-06-17 19:48 ` Dan Carpenter

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).