aboutsummaryrefslogtreecommitdiffstats
path: root/fs/adfs/dir.c
diff options
context:
space:
mode:
authorGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
committerGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
commitc71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch)
treeecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /fs/adfs/dir.c
parentea53c912f8a86a8567697115b6a0d8152beee5c8 (diff)
parent6a00f206debf8a5c8899055726ad127dbeeed098 (diff)
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts: litmus/sched_cedf.c
Diffstat (limited to 'fs/adfs/dir.c')
-rw-r--r--fs/adfs/dir.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/fs/adfs/dir.c b/fs/adfs/dir.c
index f4287e4de744..3d83075aaa2e 100644
--- a/fs/adfs/dir.c
+++ b/fs/adfs/dir.c
@@ -9,7 +9,6 @@
9 * 9 *
10 * Common directory handling for ADFS 10 * Common directory handling for ADFS
11 */ 11 */
12#include <linux/smp_lock.h>
13#include "adfs.h" 12#include "adfs.h"
14 13
15/* 14/*
@@ -27,8 +26,6 @@ adfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
27 struct adfs_dir dir; 26 struct adfs_dir dir;
28 int ret = 0; 27 int ret = 0;
29 28
30 lock_kernel();
31
32 if (filp->f_pos >> 32) 29 if (filp->f_pos >> 32)
33 goto out; 30 goto out;
34 31
@@ -70,7 +67,6 @@ free_out:
70 ops->free(&dir); 67 ops->free(&dir);
71 68
72out: 69out:
73 unlock_kernel();
74 return ret; 70 return ret;
75} 71}
76 72
@@ -201,7 +197,8 @@ const struct file_operations adfs_dir_operations = {
201}; 197};
202 198
203static int 199static int
204adfs_hash(struct dentry *parent, struct qstr *qstr) 200adfs_hash(const struct dentry *parent, const struct inode *inode,
201 struct qstr *qstr)
205{ 202{
206 const unsigned int name_len = ADFS_SB(parent->d_sb)->s_namelen; 203 const unsigned int name_len = ADFS_SB(parent->d_sb)->s_namelen;
207 const unsigned char *name; 204 const unsigned char *name;
@@ -237,17 +234,19 @@ adfs_hash(struct dentry *parent, struct qstr *qstr)
237 * requirements of the underlying filesystem. 234 * requirements of the underlying filesystem.
238 */ 235 */
239static int 236static int
240adfs_compare(struct dentry *parent, struct qstr *entry, struct qstr *name) 237adfs_compare(const struct dentry *parent, const struct inode *pinode,
238 const struct dentry *dentry, const struct inode *inode,
239 unsigned int len, const char *str, const struct qstr *name)
241{ 240{
242 int i; 241 int i;
243 242
244 if (entry->len != name->len) 243 if (len != name->len)
245 return 1; 244 return 1;
246 245
247 for (i = 0; i < name->len; i++) { 246 for (i = 0; i < name->len; i++) {
248 char a, b; 247 char a, b;
249 248
250 a = entry->name[i]; 249 a = str[i];
251 b = name->name[i]; 250 b = name->name[i];
252 251
253 if (a >= 'A' && a <= 'Z') 252 if (a >= 'A' && a <= 'Z')
@@ -273,8 +272,6 @@ adfs_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd)
273 struct object_info obj; 272 struct object_info obj;
274 int error; 273 int error;
275 274
276 dentry->d_op = &adfs_dentry_operations;
277 lock_kernel();
278 error = adfs_dir_lookup_byname(dir, &dentry->d_name, &obj); 275 error = adfs_dir_lookup_byname(dir, &dentry->d_name, &obj);
279 if (error == 0) { 276 if (error == 0) {
280 error = -EACCES; 277 error = -EACCES;
@@ -286,7 +283,6 @@ adfs_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd)
286 if (inode) 283 if (inode)
287 error = 0; 284 error = 0;
288 } 285 }
289 unlock_kernel();
290 d_add(dentry, inode); 286 d_add(dentry, inode);
291 return ERR_PTR(error); 287 return ERR_PTR(error);
292} 288}