]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
ocfs2: don't reset s_dev on dismount
authorChristian Brauner <brauner@kernel.org>
Tue, 16 Jun 2026 14:08:22 +0000 (16:08 +0200)
committerChristian Brauner <brauner@kernel.org>
Mon, 29 Jun 2026 08:31:52 +0000 (10:31 +0200)
ocfs2_dismount_volume() has reset sb->s_dev to zero since the original
merge in ccd979bdbce9 ("[PATCH] OCFS2: The Second Oracle Cluster
Filesystem") as part of scrubbing the super_block. Nothing reads the
field afterwards: all ocfs2-internal uses are mount-time log and trace
prints, and dev_t-keyed superblock lookups skip a dying superblock
anyway - s_root is gone before ->put_super runs and super_lock()
refuses SB_DYING superblocks.

The upcoming device-to-superblock table registers every superblock
under its s_dev. Drop the reset instead of leaving a superblock around
whose s_dev contradicts its registration.

Link: https://patch.msgid.link/20260616-work-super-bdev_holder_global-v2-6-7df6b864028e@kernel.org
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
fs/ocfs2/super.c

index bcac614ff02a8bf11794e8428819b40785ae4f5a..c62e389d4dd6595ea38881310613ce96d4375f3d 100644 (file)
@@ -1882,7 +1882,6 @@ static void ocfs2_dismount_volume(struct super_block *sb, int mnt_err)
 
        ocfs2_delete_osb(osb);
        kfree(osb);
-       sb->s_dev = 0;
        sb->s_fs_info = NULL;
 }