* [PATCH] [UFS] fs/ufs/super.c misreads the file system state
@ 2007-09-19 16:31 Leonid Kalev
2007-09-20 12:39 ` Satyam Sharma
0 siblings, 1 reply; 2+ messages in thread
From: Leonid Kalev @ 2007-09-19 16:31 UTC (permalink / raw)
To: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 670 bytes --]
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
[-- Attachment #2: ufs_state_bug_l.patch --]
[-- Type: text/x-patch, Size: 453 bytes --]
--- 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;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] [UFS] fs/ufs/super.c misreads the file system state
2007-09-19 16:31 [PATCH] [UFS] fs/ufs/super.c misreads the file system state Leonid Kalev
@ 2007-09-20 12:39 ` Satyam Sharma
0 siblings, 0 replies; 2+ messages in thread
From: Satyam Sharma @ 2007-09-20 12:39 UTC (permalink / raw)
To: Leonid Kalev; +Cc: Linux Kernel Mailing List, Andrew Morton, dushistov
On Wed, 19 Sep 2007, Leonid Kalev wrote:
>
> 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.
The same fix is already in 2.6.23-rc6-mm1 (don't know if it's lined up
for .23 though, I think it should be).
Satyam
PS: All my mails to Evgeniy Dushistov never reach him. The mail.ru server
is absolutely *evil* and simply rejects all mails unless the sender
is already whitelisted by the reciever (!)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-09-20 12:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-19 16:31 [PATCH] [UFS] fs/ufs/super.c misreads the file system state Leonid Kalev
2007-09-20 12:39 ` Satyam Sharma
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox