public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Chris Mason <mason@suse.com>
To: viro@math.psu.edu
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] sb_read problem in hpfs
Date: Wed, 20 Feb 2002 08:00:30 -0500	[thread overview]
Message-ID: <143960000.1014210030@tiny> (raw)


Hi guys,

hpfs_read_super triggers calls to sb_bread (through hpfs_map_sector) 
before setting s_blocksize.  This leads to a BUG() in grow_buffers.

This patch was tested lightly, hpfs_read_super completes
properly when an hpfs FS is not present.

-chris

--- suse.4/fs/hpfs/super.c Tue, 19 Feb 2002 08:55:47 -0500 
+++ suse.4(w)/fs/hpfs/super.c Tue, 19 Feb 2002 22:28:37 -0500 
@@ -410,6 +410,8 @@
 	/*s->s_hpfs_mounting = 1;*/
 	dev = s->s_dev;
 	set_blocksize(dev, 512);
+	s->s_blocksize = 512;
+	s->s_blocksize_bits = 9;
 	s->s_hpfs_fs_size = -1;
 	if (!(bootblock = hpfs_map_sector(s, 0, &bh0, 0))) goto bail1;
 	if (!(superblock = hpfs_map_sector(s, 16, &bh1, 1))) goto bail2;
@@ -436,8 +438,6 @@
 
 	/* Fill superblock stuff */
 	s->s_magic = HPFS_SUPER_MAGIC;
-	s->s_blocksize = 512;
-	s->s_blocksize_bits = 9;
 	s->s_op = &hpfs_sops;
 
 	s->s_hpfs_root = superblock->root;


             reply	other threads:[~2002-02-20 13:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-20 13:00 Chris Mason [this message]
2002-02-20 13:11 ` [PATCH] sb_read problem in hpfs Alexander Viro

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=143960000.1014210030@tiny \
    --to=mason@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@math.psu.edu \
    /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