HomeFreeBSD

Linux: g/c leftover fence in zfs_znode_alloc

Description

Linux: g/c leftover fence in zfs_znode_alloc

The port removed provisions for zfs_znode_move but the cleanup missed
this bit. To quote the original:

[snip]

list_insert_tail(&zfsvfs->z_all_znodes, zp);
membar_producer();
/*
 * Everything else must be valid before assigning z_zfsvfs makes the
 * znode eligible for zfs_znode_move().
 */
zp->z_zfsvfs = zfsvfs;

[/snip]

In the current code it is immediately followed by unlock which issues
the same fence, thus plays no role in correctness.

Reviewed-by: Matt Macy <mmacy@FreeBSD.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Mateusz Guzik <mjguzik@gmail.com>
Closes #11115

Details

Provenance
mjgAuthored on Oct 29 2020, 4:54 PM
GitHub <noreply@github.com>Committed on Oct 29 2020, 4:54 PM
Parents
rG082ff328f258: FreeBSD: g/c unused zfs_znode_move support
Branches
Unknown
Tags
Unknown