FreeBSD Bugzilla – Attachment 220378 Details for
Bug 251694
Spurious EBUSY after zfs receiving properties to an existing dataset
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Fix the merge error from r344569
bug_251694.diff (text/plain), 1.29 KB, created by
Alan Somers
on 2020-12-08 21:58:38 UTC
(
hide
)
Description:
Fix the merge error from r344569
Filename:
MIME Type:
Creator:
Alan Somers
Created:
2020-12-08 21:58:38 UTC
Size:
1.29 KB
patch
obsolete
>Index: stable/12/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c >=================================================================== >--- stable/12/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c (revision 368272) >+++ stable/12/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c (working copy) >@@ -895,13 +895,25 @@ > mnttab_node_t *mtn; > > pthread_mutex_lock(&hdl->libzfs_mnttab_cache_lock); >- if (avl_numnodes(&hdl->libzfs_mnttab_cache) == 0) { >+ if (avl_numnodes(&hdl->libzfs_mnttab_cache) != 0) { > mtn = zfs_alloc(hdl, sizeof (mnttab_node_t)); > mtn->mtn_mt.mnt_special = zfs_strdup(hdl, special); > mtn->mtn_mt.mnt_mountp = zfs_strdup(hdl, mountp); > mtn->mtn_mt.mnt_fstype = zfs_strdup(hdl, MNTTYPE_ZFS); > mtn->mtn_mt.mnt_mntopts = zfs_strdup(hdl, mntopts); >- avl_add(&hdl->libzfs_mnttab_cache, mtn); >+ /* >+ * Another thread may have already added this entry >+ * via libzfs_mnttab_update. If so we should skip it. >+ */ >+ if (avl_find(&hdl->libzfs_mnttab_cache, mtn, NULL) != NULL) { >+ free(mtn->mtn_mt.mnt_special); >+ free(mtn->mtn_mt.mnt_mountp); >+ free(mtn->mtn_mt.mnt_fstype); >+ free(mtn->mtn_mt.mnt_mntopts); >+ free(mtn); >+ } else { >+ avl_add(&hdl->libzfs_mnttab_cache, mtn); >+ } > } > pthread_mutex_unlock(&hdl->libzfs_mnttab_cache_lock); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 251694
: 220378