From: ericvh@gmail.com (Eric Van Hensbergen)
To: akpm@osdl.org
Cc: linux-kernel@vger.kernel.org,
v9fs-developer@lists.sourceforge.net, ericvh@gmail.com
Subject: [PATCH 2/3] v9fs: fix bug in atomic create open fix
Date: Sun, 26 Feb 2006 22:12:55 -0600 (CST) [thread overview]
Message-ID: <20060227041255.A9B375A8075@localhost.localdomain> (raw)
Subject: [PATCH] v9fs: Fix lucho's atomic create+open
Lucho's atomic create+open fix had a bug in the super block initialization
causing all mounts to fail. He was freeing an fcall too early. This patch
fixes that oversight.
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
---
fs/9p/vfs_super.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
40d713812e51d2dbca49a3db8ca802f373b71f51
diff --git a/fs/9p/vfs_super.c b/fs/9p/vfs_super.c
--- a/fs/9p/vfs_super.c
+++ b/fs/9p/vfs_super.c
@@ -160,7 +160,6 @@ static struct super_block *v9fs_get_sb(s
v9fs_t_clunk(v9ses, newfid);
} else {
/* Setup the Root Inode */
- kfree(fcall);
root_fid = v9fs_fid_create(v9ses, newfid);
if (root_fid == NULL) {
retval = -ENOMEM;
@@ -168,8 +167,10 @@ static struct super_block *v9fs_get_sb(s
}
retval = v9fs_fid_insert(root_fid, root);
- if (retval < 0)
+ if (retval < 0) {
+ kfree(fcall);
goto put_back_sb;
+ }
root_fid->qid = fcall->params.rstat.stat.qid;
root->d_inode->i_ino =
@@ -177,6 +178,8 @@ static struct super_block *v9fs_get_sb(s
v9fs_stat2inode(&fcall->params.rstat.stat, root->d_inode, sb);
}
+ kfree(fcall);
+
if (stat_result < 0) {
retval = stat_result;
goto put_back_sb;
reply other threads:[~2006-02-27 4:12 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=20060227041255.A9B375A8075@localhost.localdomain \
--to=ericvh@gmail.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=v9fs-developer@lists.sourceforge.net \
/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®