@@ -1519,9 +1519,7 @@ static int read_super_block(struct super_block *s, int offset)
1519
1519
static int reread_meta_blocks (struct super_block * s )
1520
1520
{
1521
1521
ll_rw_block (READ , 1 , & (SB_BUFFER_WITH_SB (s )));
1522
- reiserfs_write_unlock (s );
1523
1522
wait_on_buffer (SB_BUFFER_WITH_SB (s ));
1524
- reiserfs_write_lock (s );
1525
1523
if (!buffer_uptodate (SB_BUFFER_WITH_SB (s ))) {
1526
1524
reiserfs_warning (s , "reiserfs-2504" , "error reading the super" );
1527
1525
return 1 ;
@@ -1837,24 +1835,14 @@ static int reiserfs_fill_super(struct super_block *s, void *data, int silent)
1837
1835
*/
1838
1836
}
1839
1837
1840
- /*
1841
- * This path assumed to be called with the BKL in the old times.
1842
- * Now we have inherited the big reiserfs lock from it and many
1843
- * reiserfs helpers called in the mount path and elsewhere require
1844
- * this lock to be held even if it's not always necessary. Let's be
1845
- * conservative and hold it early. The window can be reduced after
1846
- * careful review of the code.
1847
- */
1848
- reiserfs_write_lock (s );
1849
-
1850
1838
if (reread_meta_blocks (s )) {
1851
1839
SWARN (silent , s , "jmacd-9" ,
1852
1840
"unable to reread meta blocks after journal init" );
1853
- goto error ;
1841
+ goto error_unlocked ;
1854
1842
}
1855
1843
1856
1844
if (replay_only (s ))
1857
- goto error ;
1845
+ goto error_unlocked ;
1858
1846
1859
1847
if (bdev_read_only (s -> s_bdev ) && !(s -> s_flags & MS_RDONLY )) {
1860
1848
SWARN (silent , s , "clm-7000" ,
@@ -1868,9 +1856,19 @@ static int reiserfs_fill_super(struct super_block *s, void *data, int silent)
1868
1856
reiserfs_init_locked_inode , (void * )(& args ));
1869
1857
if (!root_inode ) {
1870
1858
SWARN (silent , s , "jmacd-10" , "get root inode failed" );
1871
- goto error ;
1859
+ goto error_unlocked ;
1872
1860
}
1873
1861
1862
+ /*
1863
+ * This path assumed to be called with the BKL in the old times.
1864
+ * Now we have inherited the big reiserfs lock from it and many
1865
+ * reiserfs helpers called in the mount path and elsewhere require
1866
+ * this lock to be held even if it's not always necessary. Let's be
1867
+ * conservative and hold it early. The window can be reduced after
1868
+ * careful review of the code.
1869
+ */
1870
+ reiserfs_write_lock (s );
1871
+
1874
1872
if (root_inode -> i_state & I_NEW ) {
1875
1873
reiserfs_read_locked_inode (root_inode , & args );
1876
1874
unlock_new_inode (root_inode );
0 commit comments