mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-23 02:44:41 +03:00
Enable -Wwrite-strings
Also, fix leak from ztest_global_vars_to_zdb_args() Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #13348
This commit is contained in:
+6
-6
@@ -1268,7 +1268,7 @@ dnode_buf_evict_async(void *dbu)
|
||||
*/
|
||||
int
|
||||
dnode_hold_impl(objset_t *os, uint64_t object, int flag, int slots,
|
||||
void *tag, dnode_t **dnp)
|
||||
const void *tag, dnode_t **dnp)
|
||||
{
|
||||
int epb, idx, err;
|
||||
int drop_struct_lock = FALSE;
|
||||
@@ -1562,7 +1562,7 @@ dnode_hold_impl(objset_t *os, uint64_t object, int flag, int slots,
|
||||
* Return held dnode if the object is allocated, NULL if not.
|
||||
*/
|
||||
int
|
||||
dnode_hold(objset_t *os, uint64_t object, void *tag, dnode_t **dnp)
|
||||
dnode_hold(objset_t *os, uint64_t object, const void *tag, dnode_t **dnp)
|
||||
{
|
||||
return (dnode_hold_impl(os, object, DNODE_MUST_BE_ALLOCATED, 0, tag,
|
||||
dnp));
|
||||
@@ -1574,7 +1574,7 @@ dnode_hold(objset_t *os, uint64_t object, void *tag, dnode_t **dnp)
|
||||
* new reference.
|
||||
*/
|
||||
boolean_t
|
||||
dnode_add_ref(dnode_t *dn, void *tag)
|
||||
dnode_add_ref(dnode_t *dn, const void *tag)
|
||||
{
|
||||
mutex_enter(&dn->dn_mtx);
|
||||
if (zfs_refcount_is_zero(&dn->dn_holds)) {
|
||||
@@ -1587,14 +1587,14 @@ dnode_add_ref(dnode_t *dn, void *tag)
|
||||
}
|
||||
|
||||
void
|
||||
dnode_rele(dnode_t *dn, void *tag)
|
||||
dnode_rele(dnode_t *dn, const void *tag)
|
||||
{
|
||||
mutex_enter(&dn->dn_mtx);
|
||||
dnode_rele_and_unlock(dn, tag, B_FALSE);
|
||||
}
|
||||
|
||||
void
|
||||
dnode_rele_and_unlock(dnode_t *dn, void *tag, boolean_t evicting)
|
||||
dnode_rele_and_unlock(dnode_t *dn, const void *tag, boolean_t evicting)
|
||||
{
|
||||
uint64_t refs;
|
||||
/* Get while the hold prevents the dnode from moving. */
|
||||
@@ -2029,7 +2029,7 @@ dnode_dirty_l1range(dnode_t *dn, uint64_t start_blkid, uint64_t end_blkid,
|
||||
}
|
||||
|
||||
void
|
||||
dnode_set_dirtyctx(dnode_t *dn, dmu_tx_t *tx, void *tag)
|
||||
dnode_set_dirtyctx(dnode_t *dn, dmu_tx_t *tx, const void *tag)
|
||||
{
|
||||
/*
|
||||
* Don't set dirtyctx to SYNC if we're just modifying this as we
|
||||
|
||||
Reference in New Issue
Block a user