From: Jeff Layton <jlayton@redhat.com>
To: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
akpm@osdl.org
Subject: [PATCH 3/3] new_inode_autonum: fix up possible i_ino collision in simple_fill_super()
Date: Thu, 09 Nov 2006 10:24:46 -0500 [thread overview]
Message-ID: <1163085886.21469.47.camel@dantu.rdu.redhat.com> (raw)
simple_fill_super() looked like a bug waiting to happen. It is fairly hard to
trigger, but still. This should fix it, although in a fairly crude manner.
Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
diff --git a/fs/libfs.c b/fs/libfs.c
index bd08e0e..477c012 100644
--- a/fs/libfs.c
+++ b/fs/libfs.c
@@ -373,6 +373,10 @@ int simple_fill_super(struct super_block
inode = new_inode(s);
if (!inode)
return -ENOMEM;
+ /* ino must not collide with any ino assigned in the loop below.
+ * This value is arbitrary but should be "big enough" to avoid
+ * collisions. */
+ inode->i_ino = 0x8000000;
inode->i_mode = S_IFDIR | 0755;
inode->i_uid = inode->i_gid = 0;
inode->i_blocks = 0;
reply other threads:[~2006-11-09 15:25 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1163085886.21469.47.camel@dantu.rdu.redhat.com \
--to=jlayton@redhat.com \
--cc=akpm@osdl.org \
--cc=linux-fsdevel@vger.kernel.org \
--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®