lkml.org 
[lkml]   [2007]   [Sep]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] [UFS] fs/ufs/super.c misreads the file system state
ufs_get_fs_state() needs the file system type to read the state from the 
correct place in the superblock. It takes the type from
UFS_SB(sb)->s_flags, but that value is stored after the first call to
ufs_get_fs_state(). The patch below moves the assignment of s_flags up,
before the first call to ufs_get_fs_state().

The patch is against linux-2.6.23-rc6-git7, but it applies (with offset)
to 2.6.22 and to earlier versions as well. It has been tested on the
Solaris flavor of UFS (ufstype=sunx86) - with this change, the file
system can be used in read-write mode.

* Please cc me when replying to this - I am not subscribed to the
linux-kernel list. *

Leonid
--- a/fs/ufs/super.c
+++ b/fs/ufs/super.c
@@ -897,6 +897,8 @@

ufs_print_super_stuff(sb, usb1, usb2, usb3);

+ sbi->s_flags = flags;
+
/*
* Check, if file system was correctly unmounted.
* If not, make it read only.
@@ -1026,8 +1028,6 @@
uspi->s_maxsymlinklen =
fs32_to_cpu(sb, usb3->fs_un2.fs_44.fs_maxsymlinklen);

- sbi->s_flags = flags;
-
inode = iget(sb, UFS_ROOTINO);
if (!inode || is_bad_inode(inode))
goto failed;
\
 
 \ /
  Last update: 2007-09-19 18:39    [W:0.130 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site