summaryrefslogtreecommitdiffstats
path: root/module/zfs/zfs_znode.c
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2014-09-08 18:31:27 -0700
committerBrian Behlendorf <[email protected]>2014-09-11 09:11:45 -0700
commit2d501583430e54be39c6aed033fc6f841e469f23 (patch)
tree288e68f21f376565000c08c8448854c0bb1e9453 /module/zfs/zfs_znode.c
parent52dd454d05a14813ed74e93dfca6ac2994333c4d (diff)
Fix z_teardown_inactive_lock deadlock
When rolling back a mounted filesystem zfs_suspend() is called which acquires the z_teardown_inactive_lock. This lock can not be dropped until the filesystem has been rolled back and resumed in zfs_resume_fs(). Therefore, we must not call iput() under this lock because it may result in the inode->evict() handler being called which also takes this lock. Instead use zfs_iput_async() to ensure dropping the last reference is deferred and runs in a safe context. Signed-off-by: Brian Behlendorf <[email protected]> Closes #2670
Diffstat (limited to 'module/zfs/zfs_znode.c')
-rw-r--r--module/zfs/zfs_znode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/module/zfs/zfs_znode.c b/module/zfs/zfs_znode.c
index f2e305f7a..08faf0838 100644
--- a/module/zfs/zfs_znode.c
+++ b/module/zfs/zfs_znode.c
@@ -1009,7 +1009,7 @@ zfs_rezget(znode_t *zp)
}
if (zp->z_xattr_parent) {
- iput(ZTOI(zp->z_xattr_parent));
+ zfs_iput_async(ZTOI(zp->z_xattr_parent));
zp->z_xattr_parent = NULL;
}
rw_exit(&zp->z_xattr_lock);