Fix coverity defects: CID 147626, 147628

CID 147626: Type:Dereference before null check
CID 147628: Type:Dereference before null check

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov
Reviewed-by: Chunwei Chen <david.chen@osnexus.com>
Signed-off-by: cao.xuewen <cao.xuewen@zte.com.cn>
Closes #5304
This commit is contained in:
cao
2016-11-09 06:28:17 +08:00
committed by Brian Behlendorf
parent ffb78320c8
commit a36cc8d242
2 changed files with 8 additions and 11 deletions
+1 -2
View File
@@ -4256,8 +4256,7 @@ zfs_putpage(struct inode *ip, struct page *pp, struct writeback_control *wbc)
* writepages() normally handles the entire commit for
* performance reasons.
*/
if (zsb->z_log != NULL)
zil_commit(zsb->z_log, zp->z_id);
zil_commit(zsb->z_log, zp->z_id);
}
ZFS_EXIT(zsb);