[PATCH] Fixes return checks of functions affs_truncate and affs_grow_extcache

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Nicholas Krause <xerofoify@xxxxxxxxx>
---
 fs/affs/file.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/fs/affs/file.c b/fs/affs/file.c
index a227cec..15bc7f6 100644
--- a/fs/affs/file.c
+++ b/fs/affs/file.c
@@ -121,9 +121,9 @@ affs_grow_extcache(struct inode *inode, u32 lc_idx)
 		j = AFFS_I(inode)->i_lc_mask + 1;
 		// unlock cache
 		for (; j > 0; j--) {
+			if (!bh)
+				goto err;
 			bh = affs_bread(sb, key);
 			key = be32_to_cpu(AFFS_TAIL(sb, bh)->extension);
 			affs_brelse(bh);
 		}
@@ -924,7 +924,7 @@ affs_truncate(struct inode *inode)
 	while (ext_key) {
 		ext_bh = affs_bread(sb, ext_key);
 		if(!ext_bh)
-			goto err;
+			return;
 		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-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux