diff options
Diffstat (limited to 'fs/hpfs/dentry.c')
-rw-r--r-- | fs/hpfs/dentry.c | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/fs/hpfs/dentry.c b/fs/hpfs/dentry.c index 67d9d36b3d5f..32c13a94e1e9 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,19 +35,25 @@ 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 | } |
@@ -58,5 +65,5 @@ static const struct dentry_operations hpfs_dentry_operations = { | |||
58 | 65 | ||
59 | void hpfs_set_dentry_operations(struct dentry *dentry) | 66 | void hpfs_set_dentry_operations(struct dentry *dentry) |
60 | { | 67 | { |
61 | dentry->d_op = &hpfs_dentry_operations; | 68 | d_set_d_op(dentry, &hpfs_dentry_operations); |
62 | } | 69 | } |