mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-25 11:47:43 +03:00
OpenZFS 6842 - Fix empty xattr dir causing lockup
Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed by: Dan McDonald <danmcd@omniti.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Ported-by: Denys Rtveliashvili <denys@rtveliashvili.name>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
An initial version of this patch was applied in commit 29572cc and
subsequently refined upstream. Since the implementations do not
conflict with each other both are left applied for now.
OpenZFS-issue: https://www.illumos.org/issues/6842
OpenZFS-commit: https://github.com/openzfs/openzfs/commit/02525cd
Closes #4615
This commit is contained in:
committed by
Brian Behlendorf
parent
b3744ae611
commit
32c8c946ea
+7
-1
@@ -585,7 +585,13 @@ zap_deref_leaf(zap_t *zap, uint64_t h, dmu_tx_t *tx, krw_t lt, zap_leaf_t **lp)
|
||||
|
||||
ASSERT(zap->zap_dbuf == NULL ||
|
||||
zap_f_phys(zap) == zap->zap_dbuf->db_data);
|
||||
ASSERT3U(zap_f_phys(zap)->zap_magic, ==, ZAP_MAGIC);
|
||||
|
||||
/* Reality check for corrupt zap objects (leaf or header). */
|
||||
if ((zap_f_phys(zap)->zap_block_type != ZBT_LEAF &&
|
||||
zap_f_phys(zap)->zap_block_type != ZBT_HEADER) ||
|
||||
zap_f_phys(zap)->zap_magic != ZAP_MAGIC) {
|
||||
return (SET_ERROR(EIO));
|
||||
}
|
||||
idx = ZAP_HASH_IDX(h, zap_f_phys(zap)->zap_ptrtbl.zt_shift);
|
||||
err = zap_idx_to_blk(zap, idx, &blk);
|
||||
if (err != 0)
|
||||
|
||||
Reference in New Issue
Block a user