mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-23 19:04:45 +03:00
Remove bcopy(), bzero(), bcmp()
bcopy() has a confusing argument order and is actually a move, not a copy; they're all deprecated since POSIX.1-2001 and removed in -2008, and we shim them out to mem*() on Linux anyway Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #12996
This commit is contained in:
@@ -516,8 +516,8 @@ dmu_objset_open_impl(spa_t *spa, dsl_dataset_t *ds, blkptr_t *bp,
|
||||
if (arc_buf_size(os->os_phys_buf) < size) {
|
||||
arc_buf_t *buf = arc_alloc_buf(spa, &os->os_phys_buf,
|
||||
ARC_BUFC_METADATA, size);
|
||||
bzero(buf->b_data, size);
|
||||
bcopy(os->os_phys_buf->b_data, buf->b_data,
|
||||
memset(buf->b_data, 0, size);
|
||||
memcpy(buf->b_data, os->os_phys_buf->b_data,
|
||||
arc_buf_size(os->os_phys_buf));
|
||||
arc_buf_destroy(os->os_phys_buf, &os->os_phys_buf);
|
||||
os->os_phys_buf = buf;
|
||||
@@ -531,7 +531,7 @@ dmu_objset_open_impl(spa_t *spa, dsl_dataset_t *ds, blkptr_t *bp,
|
||||
os->os_phys_buf = arc_alloc_buf(spa, &os->os_phys_buf,
|
||||
ARC_BUFC_METADATA, size);
|
||||
os->os_phys = os->os_phys_buf->b_data;
|
||||
bzero(os->os_phys, size);
|
||||
memset(os->os_phys, 0, size);
|
||||
}
|
||||
/*
|
||||
* These properties will be filled in by the logic in zfs_get_zplprop()
|
||||
|
||||
Reference in New Issue
Block a user