diff options
author | наб <[email protected]> | 2022-02-25 14:26:54 +0100 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2022-03-15 15:13:42 -0700 |
commit | 861166b02701dfc8f63a105bd32758e806c84fd7 (patch) | |
tree | 1f9341513470b4615ca340c40ad087101c7dcf24 /module/os/linux/zfs/zfs_acl.c | |
parent | 1d77d62f5a77cab85d4b98ecf72a9838f70d6bf1 (diff) |
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 <[email protected]>
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Closes #12996
Diffstat (limited to 'module/os/linux/zfs/zfs_acl.c')
-rw-r--r-- | module/os/linux/zfs/zfs_acl.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/module/os/linux/zfs/zfs_acl.c b/module/os/linux/zfs/zfs_acl.c index 1859ecd99..351e4dad7 100644 --- a/module/os/linux/zfs/zfs_acl.c +++ b/module/os/linux/zfs/zfs_acl.c @@ -687,10 +687,10 @@ zfs_copy_ace_2_fuid(zfsvfs_t *zfsvfs, umode_t obj_mode, zfs_acl_t *aclp, zobjacep = (zfs_object_ace_t *)aceptr; aceobjp = (ace_object_t *)acep; - bcopy(aceobjp->a_obj_type, zobjacep->z_object_type, + memcpy(zobjacep->z_object_type, aceobjp->a_obj_type, sizeof (aceobjp->a_obj_type)); - bcopy(aceobjp->a_inherit_obj_type, - zobjacep->z_inherit_type, + memcpy(zobjacep->z_inherit_type, + aceobjp->a_inherit_obj_type, sizeof (aceobjp->a_inherit_obj_type)); acep = (ace_t *)((caddr_t)acep + sizeof (ace_object_t)); break; @@ -737,11 +737,11 @@ zfs_copy_fuid_2_ace(zfsvfs_t *zfsvfs, zfs_acl_t *aclp, cred_t *cr, } zobjacep = (zfs_object_ace_t *)zacep; objacep = (ace_object_t *)acep; - bcopy(zobjacep->z_object_type, - objacep->a_obj_type, + memcpy(objacep->a_obj_type, + zobjacep->z_object_type, sizeof (zobjacep->z_object_type)); - bcopy(zobjacep->z_inherit_type, - objacep->a_inherit_obj_type, + memcpy(objacep->a_inherit_obj_type, + zobjacep->z_inherit_type, sizeof (zobjacep->z_inherit_type)); ace_size = sizeof (ace_object_t); break; @@ -1102,7 +1102,7 @@ zfs_acl_node_read(struct znode *zp, boolean_t have_lock, zfs_acl_t **aclpp, znode_acl.z_acl_extern_obj, 0, aclnode->z_size, aclnode->z_acldata, DMU_READ_PREFETCH); } else { - bcopy(znode_acl.z_ace_data, aclnode->z_acldata, + memcpy(aclnode->z_acldata, znode_acl.z_ace_data, aclnode->z_size); } } else { @@ -1447,7 +1447,7 @@ zfs_aclset_common(znode_t *zp, zfs_acl_t *aclp, cred_t *cr, dmu_tx_t *tx) aclnode = list_next(&aclp->z_acl, aclnode)) { if (aclnode->z_ace_count == 0) continue; - bcopy(aclnode->z_acldata, start, + memcpy(start, aclnode->z_acldata, aclnode->z_size); start = (caddr_t)start + aclnode->z_size; } @@ -1727,7 +1727,7 @@ zfs_acl_inherit(zfsvfs_t *zfsvfs, umode_t va_mode, zfs_acl_t *paclp, if ((data1sz = paclp->z_ops->ace_data(pacep, &data1)) != 0) { VERIFY((data2sz = aclp->z_ops->ace_data(acep, &data2)) == data1sz); - bcopy(data1, data2, data2sz); + memcpy(data2, data1, data2sz); } aclp->z_acl_count++; @@ -1791,7 +1791,7 @@ zfs_acl_ids_create(znode_t *dzp, int flag, vattr_t *vap, cred_t *cr, boolean_t trim = B_FALSE; boolean_t inherited = B_FALSE; - bzero(acl_ids, sizeof (zfs_acl_ids_t)); + memset(acl_ids, 0, sizeof (zfs_acl_ids_t)); acl_ids->z_mode = vap->va_mode; if (vsecp) @@ -2016,7 +2016,7 @@ zfs_getacl(znode_t *zp, vsecattr_t *vsecp, boolean_t skipaclchk, cred_t *cr) for (aclnode = list_head(&aclp->z_acl); aclnode; aclnode = list_next(&aclp->z_acl, aclnode)) { - bcopy(aclnode->z_acldata, start, + memcpy(start, aclnode->z_acldata, aclnode->z_size); start = (caddr_t)start + aclnode->z_size; } |