android_kernel_motorola_sm6225/fs/nfs/flexfilelayout
Baptiste Lepers e311fcf4d4 pnfs/flexfiles: Fix misplaced barrier in nfs4_ff_layout_prepare_ds
[ Upstream commit a2915fa06227b056a8f9b0d79b61dca08ad5cfc6 ]

_nfs4_pnfs_v3/v4_ds_connect do
   some work
   smp_wmb
   ds->ds_clp = clp;

And nfs4_ff_layout_prepare_ds currently does
   smp_rmb
   if(ds->ds_clp)
      ...

This patch places the smp_rmb after the if. This ensures that following
reads only happen once nfs4_ff_layout_prepare_ds has checked that data
has been properly initialized.

Fixes: d67ae825a5 ("pnfs/flexfiles: Add the FlexFile Layout Driver")
Signed-off-by: Baptiste Lepers <baptiste.lepers@gmail.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-11-26 11:36:14 +01:00
..
flexfilelayout.c pNFS/flexfiles: fix incorrect size check in decode_nfs_fh() 2021-05-22 10:59:43 +02:00
flexfilelayout.h NFSv4/flexfiles: Fix invalid deref in FF_LAYOUT_DEVID_NODE() 2020-01-27 14:50:29 +01:00
flexfilelayoutdev.c pnfs/flexfiles: Fix misplaced barrier in nfs4_ff_layout_prepare_ds 2021-11-26 11:36:14 +01:00
Makefile