pNFS/flexfiles: Check the layout validity in ff_layout_mirror_prepare_stats
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Sun, 8 Oct 2023 18:28:46 +0000 (14:28 -0400)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Wed, 18 Oct 2023 18:42:09 +0000 (14:42 -0400)
commite1c6cfbb3bd1377e2ddcbe06cf8fb1ec323ea7d3
tree0285c4075ef3d2612df96af422940ae11008dc3c
parentf63955721a8020e979b99cc417dcb6da3106aa24
pNFS/flexfiles: Check the layout validity in ff_layout_mirror_prepare_stats

Ensure that we check the layout pointer and validity after dereferencing
it in ff_layout_mirror_prepare_stats.

Fixes: 08e2e5bc6c9a ("pNFS/flexfiles: Clean up layoutstats")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
fs/nfs/flexfilelayout/flexfilelayout.c