diff options
author | Dave Kleikamp <shaggy@austin.ibm.com> | 2006-03-14 18:05:45 -0500 |
---|---|---|
committer | Dave Kleikamp <shaggy@austin.ibm.com> | 2006-03-14 18:05:45 -0500 |
commit | c5111f504d2a9b0d258d7c4752b4093523315989 (patch) | |
tree | 6a52864aff79691689aea21cb0cb928327d5de5b /fs/9p/vfs_super.c | |
parent | 69eb66d7da7dba2696281981347698e1693c2340 (diff) | |
parent | a488edc914aa1d766a4e2c982b5ae03d5657ec1b (diff) |
Merge with /home/shaggy/git/linus-clean/
Diffstat (limited to 'fs/9p/vfs_super.c')
-rw-r--r-- | fs/9p/vfs_super.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/fs/9p/vfs_super.c b/fs/9p/vfs_super.c index 2c4fa75be025..d05318fa684e 100644 --- a/fs/9p/vfs_super.c +++ b/fs/9p/vfs_super.c | |||
@@ -146,7 +146,6 @@ static struct super_block *v9fs_get_sb(struct file_system_type | |||
146 | inode->i_gid = gid; | 146 | inode->i_gid = gid; |
147 | 147 | ||
148 | root = d_alloc_root(inode); | 148 | root = d_alloc_root(inode); |
149 | |||
150 | if (!root) { | 149 | if (!root) { |
151 | retval = -ENOMEM; | 150 | retval = -ENOMEM; |
152 | goto put_back_sb; | 151 | goto put_back_sb; |
@@ -158,15 +157,20 @@ static struct super_block *v9fs_get_sb(struct file_system_type | |||
158 | if (stat_result < 0) { | 157 | if (stat_result < 0) { |
159 | dprintk(DEBUG_ERROR, "stat error\n"); | 158 | dprintk(DEBUG_ERROR, "stat error\n"); |
160 | v9fs_t_clunk(v9ses, newfid); | 159 | v9fs_t_clunk(v9ses, newfid); |
161 | v9fs_put_idpool(newfid, &v9ses->fidpool); | ||
162 | } else { | 160 | } else { |
163 | /* Setup the Root Inode */ | 161 | /* Setup the Root Inode */ |
164 | root_fid = v9fs_fid_create(root, v9ses, newfid, 0); | 162 | root_fid = v9fs_fid_create(v9ses, newfid); |
165 | if (root_fid == NULL) { | 163 | if (root_fid == NULL) { |
166 | retval = -ENOMEM; | 164 | retval = -ENOMEM; |
167 | goto put_back_sb; | 165 | goto put_back_sb; |
168 | } | 166 | } |
169 | 167 | ||
168 | retval = v9fs_fid_insert(root_fid, root); | ||
169 | if (retval < 0) { | ||
170 | kfree(fcall); | ||
171 | goto put_back_sb; | ||
172 | } | ||
173 | |||
170 | root_fid->qid = fcall->params.rstat.stat.qid; | 174 | root_fid->qid = fcall->params.rstat.stat.qid; |
171 | root->d_inode->i_ino = | 175 | root->d_inode->i_ino = |
172 | v9fs_qid2ino(&fcall->params.rstat.stat.qid); | 176 | v9fs_qid2ino(&fcall->params.rstat.stat.qid); |