diff options
author | cao <[email protected]> | 2016-11-02 01:20:24 +0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2016-11-01 10:20:24 -0700 |
commit | 981b21260e7ad35b59cee2989477276109b6b3a2 (patch) | |
tree | 81be56ae1ccc96ad1de65736d48e853a3ff9118a /module/zfs/dmu_tx.c | |
parent | 2bac68145f94012d6e41dffb9f4a7faf80a8e107 (diff) |
Fix coverity defects: CID 147553
CID 147553: Type:Dereference null return value
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: cao.xuewen <[email protected]>
Closes #5305
Diffstat (limited to 'module/zfs/dmu_tx.c')
-rw-r--r-- | module/zfs/dmu_tx.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/module/zfs/dmu_tx.c b/module/zfs/dmu_tx.c index d8bd7cb78..3ee946885 100644 --- a/module/zfs/dmu_tx.c +++ b/module/zfs/dmu_tx.c @@ -1249,7 +1249,8 @@ dmu_tx_unassign(dmu_tx_t *tx) * Walk the transaction's hold list, removing the hold on the * associated dnode, and notifying waiters if the refcount drops to 0. */ - for (txh = list_head(&tx->tx_holds); txh != tx->tx_needassign_txh; + for (txh = list_head(&tx->tx_holds); + txh && txh != tx->tx_needassign_txh; txh = list_next(&tx->tx_holds, txh)) { dnode_t *dn = txh->txh_dnode; |