Skip to content

Commit

Permalink
Resolve deadlock with namei and cache_purge
Browse files Browse the repository at this point in the history
Which the stack like:
    frame #2: 0xffffff800292e4a5 kernel`cache_purge
    frame #3: 0xffffff7f83281ee8 zfs`zfs_vnop_reclaim + 152
    frame #4: 0xffffff80029468f0 kernel`vclean
    frame #6: 0xffffff80029463cb kernel`vnode_reclaim_internal
    frame #9: 0xffffff800293f4b6 kernel`vnode_create
    frame #10: 0xffffff7f83283c41 zfs`zfs_znode_getvnode + 513
    frame #11: 0xffffff7f83288d78 zfs`zfs_zget_internal + 984
    frame #12: 0xffffff7f832764c9 zfs`zfs_vfs_vget + 329
    frame #13: 0xffffff800293979d kernel`namei

It would seem vnop_reclaim can not call into VFS again as it already
holds locks, and verifying with hfs_vnop_reclaim, they do not
call cache_purge().
  • Loading branch information
lundman committed Sep 2, 2015
1 parent e45f37a commit b2b7bba
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions module/zfs/zfs_vnops_osx.c
Original file line number Diff line number Diff line change
Expand Up @@ -2488,8 +2488,6 @@ zfs_vnop_reclaim(struct vnop_reclaim_args *ap)
/*
* Purge old data structures associated with the denode.
*/
cache_purge(vp);

vnode_clearfsnode(vp); /* vp->v_data = NULL */
vnode_removefsref(vp); /* ADDREF from vnode_create */
atomic_dec_64(&vnop_num_vnodes);
Expand Down

0 comments on commit b2b7bba

Please sign in to comment.