Use dsl_dataset_snap_lookup()

Retire the dmu_snapshot_id() function which was introduced in the
initial .zfs control directory implementation.  There is already
an existing dsl_dataset_snap_lookup() which does exactly what we
need, and the dmu_snapshot_id() function as implemented is racy.

https://github.com/zfsonlinux/zfs/issues/1215#issuecomment-12579879

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #1238
This commit is contained in:
Brian Behlendorf
2013-01-25 14:57:53 -08:00
parent ba43f4565a
commit 6772fb679a
5 changed files with 8 additions and 35 deletions
+1 -1
View File
@@ -314,7 +314,7 @@ dsl_dataset_get_snapname(dsl_dataset_t *ds)
return (err);
}
static int
int
dsl_dataset_snap_lookup(dsl_dataset_t *ds, const char *name, uint64_t *value)
{
objset_t *mos = ds->ds_dir->dd_pool->dp_meta_objset;