Add zfs_iput_async() interface

Handle all iputs in zfs_purgedir() and zfs_inode_destroy()
asynchronously to prevent deadlocks.  When the iputs are allowed
to run synchronously in the destroy call path deadlocks between
xattr directory inodes and their parent file inodes are possible.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Richard Yao <ryao@gentoo.org>
Closes #457
This commit is contained in:
Brian Behlendorf
2014-08-04 13:30:20 -07:00
parent 4dd18932ba
commit 0a50679ce9
4 changed files with 17 additions and 11 deletions
+1 -1
View File
@@ -292,7 +292,7 @@ zfs_inode_destroy(struct inode *ip)
}
if (zp->z_xattr_parent) {
iput(ZTOI(zp->z_xattr_parent));
zfs_iput_async(ZTOI(zp->z_xattr_parent));
zp->z_xattr_parent = NULL;
}