diff options
author | Richard Yao <[email protected]> | 2022-09-13 19:59:33 -0400 |
---|---|---|
committer | GitHub <[email protected]> | 2022-09-13 16:59:33 -0700 |
commit | cf66e7e594fc7063db8050f2b7c718ae3f94641b (patch) | |
tree | 8880e6d173a793b658f61e1c2ace06cc02b4c700 /module/zfs/zfs_ioctl.c | |
parent | 8fdc229a9cb6c7f5ba6cd8dc3b40a3c1355f66c5 (diff) |
Cleanup: Make memory barrier definitions consistent across kernels
We inherited membar_consumer() and membar_producer() from OpenSolaris,
but we had replaced membar_consumer() with Linux's smp_rmb() in
zfs_ioctl.c. The FreeBSD SPL consequently implemented a shim for the
Linux-only smp_rmb().
We reinstate membar_consumer() in platform independent code and fix the
FreeBSD SPL to implement membar_consumer() in a way analogous to Linux.
Reviewed-by: Konstantin Belousov <[email protected]>
Reviewed-by: Mateusz Guzik <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Neal Gompa <[email protected]>
Reviewed-by: Alexander Motin <[email protected]>
Signed-off-by: Richard Yao <[email protected]>
Closes #13843
Diffstat (limited to 'module/zfs/zfs_ioctl.c')
-rw-r--r-- | module/zfs/zfs_ioctl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/module/zfs/zfs_ioctl.c b/module/zfs/zfs_ioctl.c index 382975208..6b9b43271 100644 --- a/module/zfs/zfs_ioctl.c +++ b/module/zfs/zfs_ioctl.c @@ -7482,7 +7482,7 @@ zfsdev_get_state(minor_t minor, enum zfsdev_state_type which) for (zs = zfsdev_state_list; zs != NULL; zs = zs->zs_next) { if (zs->zs_minor == minor) { - smp_rmb(); + membar_consumer(); switch (which) { case ZST_ONEXIT: return (zs->zs_onexit); |