diff options
Diffstat (limited to 'fs/coda/inode.c')
-rw-r--r-- | fs/coda/inode.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/coda/inode.c b/fs/coda/inode.c index 6526e6f21ecf..bfe8179b1295 100644 --- a/fs/coda/inode.c +++ b/fs/coda/inode.c | |||
@@ -148,6 +148,8 @@ static int coda_fill_super(struct super_block *sb, void *data, int silent) | |||
148 | int error; | 148 | int error; |
149 | int idx; | 149 | int idx; |
150 | 150 | ||
151 | lock_kernel(); | ||
152 | |||
151 | idx = get_device_index((struct coda_mount_data *) data); | 153 | idx = get_device_index((struct coda_mount_data *) data); |
152 | 154 | ||
153 | /* Ignore errors in data, for backward compatibility */ | 155 | /* Ignore errors in data, for backward compatibility */ |
@@ -159,11 +161,13 @@ static int coda_fill_super(struct super_block *sb, void *data, int silent) | |||
159 | vc = &coda_comms[idx]; | 161 | vc = &coda_comms[idx]; |
160 | if (!vc->vc_inuse) { | 162 | if (!vc->vc_inuse) { |
161 | printk("coda_read_super: No pseudo device\n"); | 163 | printk("coda_read_super: No pseudo device\n"); |
164 | unlock_kernel(); | ||
162 | return -EINVAL; | 165 | return -EINVAL; |
163 | } | 166 | } |
164 | 167 | ||
165 | if ( vc->vc_sb ) { | 168 | if ( vc->vc_sb ) { |
166 | printk("coda_read_super: Device already mounted\n"); | 169 | printk("coda_read_super: Device already mounted\n"); |
170 | unlock_kernel(); | ||
167 | return -EBUSY; | 171 | return -EBUSY; |
168 | } | 172 | } |
169 | 173 | ||
@@ -202,7 +206,8 @@ static int coda_fill_super(struct super_block *sb, void *data, int silent) | |||
202 | sb->s_root = d_alloc_root(root); | 206 | sb->s_root = d_alloc_root(root); |
203 | if (!sb->s_root) | 207 | if (!sb->s_root) |
204 | goto error; | 208 | goto error; |
205 | return 0; | 209 | unlock_kernel(); |
210 | return 0; | ||
206 | 211 | ||
207 | error: | 212 | error: |
208 | bdi_destroy(&vc->bdi); | 213 | bdi_destroy(&vc->bdi); |
@@ -212,6 +217,7 @@ static int coda_fill_super(struct super_block *sb, void *data, int silent) | |||
212 | if (vc) | 217 | if (vc) |
213 | vc->vc_sb = NULL; | 218 | vc->vc_sb = NULL; |
214 | 219 | ||
220 | unlock_kernel(); | ||
215 | return -EINVAL; | 221 | return -EINVAL; |
216 | } | 222 | } |
217 | 223 | ||