FROMLIST: fs/super: function to prevent super re-use

The function is to be called from filesystem-specific code to mark a
superblock to be ignored by superblock test and thus never re-used. The
function also unregisters bdi if the bdi is per-superblock to avoid
collision if a new superblock is created to represent the filesystem.
generic_shutdown_super() skips unregistering bdi for a retired
superlock as it assumes retire function has already done it.

Signed-off-by: Daniil Lunev <dlunev@chromium.org>
Signed-off-by: Daniil Lunev <dlunev@google.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
(am from https://patchwork.kernel.org/patch/12866269/)
(also found at https://lore.kernel.org/r/20220601111059.v4.1.I0e579520b03aa244906b8fe2ef1ec63f2ab7eecf@changeid)

BUG=b:226570055
TEST=CQ

Change-Id: I0e579520b03aa244906b8fe2ef1ec63f2ab7eecf
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/3713582
Reviewed-by: Sean Paul <sean@poorly.run>
Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
Tested-by: Daniil Lunev <dlunev@chromium.org>
Commit-Queue: Daniil Lunev <dlunev@chromium.org>
2 files changed