Created
November 5, 2015 12:06
-
-
Save lundman/33bdeb1e0c03ede241db to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/module/zfs/vdev_disk.c b/module/zfs/vdev_disk.c | |
index 5143fb5..5703a37 100644 | |
--- a/module/zfs/vdev_disk.c | |
+++ b/module/zfs/vdev_disk.c | |
@@ -296,6 +296,15 @@ out: | |
return (error); | |
} | |
+static void vdev_disk_close_thread(void *arg) | |
+{ | |
+ struct vnode *vp = arg; | |
+ | |
+ (void) vnode_close(vp, 0, | |
+ spl_vfs_context_kernel()); | |
+ thread_exit(); | |
+} | |
+ | |
/* Not static so zfs_osx.cpp can call it on device removal */ | |
void | |
vdev_disk_close(vdev_t *vd) | |
@@ -327,8 +336,9 @@ vdev_disk_close(vdev_t *vd) | |
/* vnode_close() can stall during removal, so clear vd_devvp now */ | |
struct vnode *vp = dvd->vd_devvp; | |
dvd->vd_devvp = NULL; | |
- (void) vnode_close(vp, spa_mode(vd->vdev_spa), | |
- spl_vfs_context_kernel()); | |
+ (void) thread_create(NULL, 0, vdev_disk_close_thread, | |
+ vp, 0, &p0, | |
+ TS_RUN, minclsyspri); | |
} | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment