From: Christian Brauner Date: Sat, 4 Nov 2023 14:00:12 +0000 (+0100) Subject: fs: remove dead check X-Git-Tag: v6.8-rc1~214^2~11 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=efa5d065b4a0790061921194019c321ad335b8db;p=thirdparty%2Fkernel%2Flinux.git fs: remove dead check Above we call super_lock_excl() which waits until the superblock is SB_BORN and since SB_BORN is never unset once set this check can never fire. Plus, we also hold an active reference at this point already so this superblock can't even be shutdown. Link: https://lore.kernel.org/r/20231104-vfs-multi-device-freeze-v2-1-5b5b69626eac@kernel.org Tested-by: Chandan Babu R Reviewed-by: Christoph Hellwig Reviewed-by: Jan Kara Signed-off-by: Christian Brauner --- diff --git a/fs/super.c b/fs/super.c index faeab453e6e95..d2b026566dea3 100644 --- a/fs/super.c +++ b/fs/super.c @@ -1996,11 +1996,6 @@ retry: goto retry; } - if (!(sb->s_flags & SB_BORN)) { - super_unlock_excl(sb); - return 0; /* sic - it's "nothing to do" */ - } - if (sb_rdonly(sb)) { /* Nothing to do really... */ sb->s_writers.freeze_holders |= who;