Skip to contentSkip to conversation

reiserfs oneliner

PATCH New [email protected] 1 participant 1 message Dec 28, 2001

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 reiserfs oneliner

This patch removes an assignment in super.c in reiserfs that caused deadlock when mounting my reiser-filesystems.

the original code looks like this:

    size = block_size(s->s_dev);
    sb_set_blocksize(s, size);

    /* read block (64-th 1k block), which can contain reiserfs super block */
    if (read_super_block (s, REISERFS_DISK_OFFSET_IN_BYTES)) {
	// try old format (undistributed bitmap, super block in 8-th 1k block of a device)
	sb_set_blocksize(s, size);
	if (read_super_block (s, REISERFS_OLD_DISK_OFFSET_IN_BYTES)) 
	    goto error;
	else
	    old_format = 1;
    }
    s->s_blocksize = size;

If read_super_block() changes the blocksize in the superblock it shouldn't be restored again, should it?

With the following patch i can mount my reiserfs:es without deadlock.

fs/reiserfs/super.c +0 -1
@@ -637,7 +637,6 @@
 	else
 	    old_format = 1;
     }
-    s->s_blocksize = size;
 
     s->u.reiserfs_sb.s_mount_state = SB_REISERFS_STATE(s);
     s->u.reiserfs_sb.s_mount_state = REISERFS_VALID_FS ;