diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
---|---|---|
committer | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
commit | c71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch) | |
tree | ecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /fs/hpfs/dentry.c | |
parent | ea53c912f8a86a8567697115b6a0d8152beee5c8 (diff) | |
parent | 6a00f206debf8a5c8899055726ad127dbeeed098 (diff) |
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts:
litmus/sched_cedf.c
Diffstat (limited to 'fs/hpfs/dentry.c')
-rw-r--r-- | fs/hpfs/dentry.c | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/fs/hpfs/dentry.c b/fs/hpfs/dentry.c index 67d9d36b3d5f..05d4816e4e77 100644 --- a/fs/hpfs/dentry.c +++ b/fs/hpfs/dentry.c | |||
@@ -12,7 +12,8 @@ | |||
12 | * Note: the dentry argument is the parent dentry. | 12 | * Note: the dentry argument is the parent dentry. |
13 | */ | 13 | */ |
14 | 14 | ||
15 | static int hpfs_hash_dentry(struct dentry *dentry, struct qstr *qstr) | 15 | static int hpfs_hash_dentry(const struct dentry *dentry, const struct inode *inode, |
16 | struct qstr *qstr) | ||
16 | { | 17 | { |
17 | unsigned long hash; | 18 | unsigned long hash; |
18 | int i; | 19 | int i; |
@@ -34,29 +35,30 @@ static int hpfs_hash_dentry(struct dentry *dentry, struct qstr *qstr) | |||
34 | return 0; | 35 | return 0; |
35 | } | 36 | } |
36 | 37 | ||
37 | static int hpfs_compare_dentry(struct dentry *dentry, struct qstr *a, struct qstr *b) | 38 | static int hpfs_compare_dentry(const struct dentry *parent, |
39 | const struct inode *pinode, | ||
40 | const struct dentry *dentry, const struct inode *inode, | ||
41 | unsigned int len, const char *str, const struct qstr *name) | ||
38 | { | 42 | { |
39 | unsigned al=a->len; | 43 | unsigned al = len; |
40 | unsigned bl=b->len; | 44 | unsigned bl = name->len; |
41 | hpfs_adjust_length(a->name, &al); | 45 | |
46 | hpfs_adjust_length(str, &al); | ||
42 | /*hpfs_adjust_length(b->name, &bl);*/ | 47 | /*hpfs_adjust_length(b->name, &bl);*/ |
43 | /* 'a' is the qstr of an already existing dentry, so the name | 48 | |
44 | * must be valid. 'b' must be validated first. | 49 | /* |
50 | * 'str' is the nane of an already existing dentry, so the name | ||
51 | * must be valid. 'name' must be validated first. | ||
45 | */ | 52 | */ |
46 | 53 | ||
47 | if (hpfs_chk_name(b->name, &bl)) | 54 | if (hpfs_chk_name(name->name, &bl)) |
48 | return 1; | 55 | return 1; |
49 | if (hpfs_compare_names(dentry->d_sb, a->name, al, b->name, bl, 0)) | 56 | if (hpfs_compare_names(parent->d_sb, str, al, name->name, bl, 0)) |
50 | return 1; | 57 | return 1; |
51 | return 0; | 58 | return 0; |
52 | } | 59 | } |
53 | 60 | ||
54 | static const struct dentry_operations hpfs_dentry_operations = { | 61 | const struct dentry_operations hpfs_dentry_operations = { |
55 | .d_hash = hpfs_hash_dentry, | 62 | .d_hash = hpfs_hash_dentry, |
56 | .d_compare = hpfs_compare_dentry, | 63 | .d_compare = hpfs_compare_dentry, |
57 | }; | 64 | }; |
58 | |||
59 | void hpfs_set_dentry_operations(struct dentry *dentry) | ||
60 | { | ||
61 | dentry->d_op = &hpfs_dentry_operations; | ||
62 | } | ||