From: "Carsten Otte" <COTTE@de.ibm.com>
To: linux-kernel@vger.kernel.org
Subject: RFC: Bug in ext2?
Date: Wed, 16 Jan 2002 14:52:56 +0100 [thread overview]
Message-ID: <OF8874D237.85B223A3-ONC1256B43.004BF905@de.ibm.com> (raw)
Hello kernel-list-readers,
I am currently reviewing the second extended fs. I found the following
code in fs/ext2/super.c (taken from kernel 2.4.17):
static int ext2_setup_super (struct super_block * sb,
struct ext2_super_block * es,
int read_only)
{
int res = 0;
if (le32_to_cpu(es->s_rev_level) > EXT2_MAX_SUPP_REV) {
printk ("EXT2-fs warning: revision level too high, "
"forcing read-only mode\n");
res = MS_RDONLY;
}
if (read_only)
return res;
------------------8<-------------------------------*SNIPP*
ext2_write_super(sb);
------------------8<-------------------------------*SNIPP*
return res;
}
To me, it looks like if the fs revision in the super block is higher than
the
supported one while read_only is false, the result is set to MS_RDONLY,
but the super block will be written anyway.
I'd expect that MS_RDONLY should be returned at the beginning of the
funcion & the super block of a fs with an unsupported revision should _not_
be written. Am I getting s.th. wrong?
mit freundlichem Gruß / with kind regards
Carsten Otte
IBM Deutschland Entwicklung GmbH
Linux for eServer development - device driver team
Phone: +49/07031/16-4076
IBM internal phone: *120-4076
--
We are Linux.
Resistance indicates that you're missing the point!
next reply other threads:[~2002-01-16 12:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-01-16 13:52 Carsten Otte [this message]
2002-01-16 17:55 ` Andreas Dilger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=OF8874D237.85B223A3-ONC1256B43.004BF905@de.ibm.com \
--to=cotte@de.ibm.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®