aboutsummaryrefslogtreecommitdiff
path: root/fs/9p/vfs_super.c
diff options
context:
space:
mode:
authorEric Van Hensbergen <ericvh@gmail.com>2006-03-02 02:54:32 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-02 08:33:07 -0800
commit74b8054c730785cd9db093e48f53337e521b6270 (patch)
treed67f4d55de189d39afd82e0de3aa0edbccec4a23 /fs/9p/vfs_super.c
parent6a3124a3946c16159c3faf83e62ffdb5d1134b3a (diff)
[PATCH] v9fs: fix bug in atomic create open fix
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> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/9p/vfs_super.c')
-rw-r--r--fs/9p/vfs_super.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/9p/vfs_super.c b/fs/9p/vfs_super.c
index 0c85872be51..cdf787ee08d 100644
--- a/fs/9p/vfs_super.c
+++ b/fs/9p/vfs_super.c
@@ -160,7 +160,6 @@ static struct super_block *v9fs_get_sb(struct file_system_type
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(struct file_system_type
}
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(struct file_system_type
v9fs_stat2inode(&fcall->params.rstat.stat, root->d_inode, sb);
}
+ kfree(fcall);
+
if (stat_result < 0) {
retval = stat_result;
goto put_back_sb;