aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-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 0c85872be51a..cdf787ee08de 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
160 v9fs_t_clunk(v9ses, newfid); 160 v9fs_t_clunk(v9ses, newfid);
161 } else { 161 } else {
162 /* Setup the Root Inode */ 162 /* Setup the Root Inode */
163 kfree(fcall);
164 root_fid = v9fs_fid_create(v9ses, newfid); 163 root_fid = v9fs_fid_create(v9ses, newfid);
165 if (root_fid == NULL) { 164 if (root_fid == NULL) {
166 retval = -ENOMEM; 165 retval = -ENOMEM;
@@ -168,8 +167,10 @@ static struct super_block *v9fs_get_sb(struct file_system_type
168 } 167 }
169 168
170 retval = v9fs_fid_insert(root_fid, root); 169 retval = v9fs_fid_insert(root_fid, root);
171 if (retval < 0) 170 if (retval < 0) {
171 kfree(fcall);
172 goto put_back_sb; 172 goto put_back_sb;
173 }
173 174
174 root_fid->qid = fcall->params.rstat.stat.qid; 175 root_fid->qid = fcall->params.rstat.stat.qid;
175 root->d_inode->i_ino = 176 root->d_inode->i_ino =
@@ -177,6 +178,8 @@ static struct super_block *v9fs_get_sb(struct file_system_type
177 v9fs_stat2inode(&fcall->params.rstat.stat, root->d_inode, sb); 178 v9fs_stat2inode(&fcall->params.rstat.stat, root->d_inode, sb);
178 } 179 }
179 180
181 kfree(fcall);
182
180 if (stat_result < 0) { 183 if (stat_result < 0) {
181 retval = stat_result; 184 retval = stat_result;
182 goto put_back_sb; 185 goto put_back_sb;