Call dmu_snapshot_list_next() in zvol.c with dsl_pool_config lock held

Submitted by:	Andriy Gapon <avg@FreeBSD.org>
MFC after:	17 days
This commit is contained in:
Martin Matuska 2013-04-01 16:14:57 +00:00
parent ee8c73cd06
commit 20547d41f8

View File

@ -2197,8 +2197,10 @@ zvol_create_snapshots(objset_t *os, const char *name)
break;
}
dsl_pool_config_enter(dmu_objset_pool(os), FTAG);
error = dmu_snapshot_list_next(os, MAXPATHLEN - len,
sname + len, &obj, &cookie, NULL);
dsl_pool_config_exit(dmu_objset_pool(os), FTAG);
if (error != 0) {
if (error == ENOENT)
error = 0;