diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2016-07-31 16:37:25 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2016-07-31 16:37:25 -0400 |
commit | 6fa67e707559303e086303aeecc9e8b91ef497d5 (patch) | |
tree | e5d034b0e9c533bd4e14fc0755432b50d69da2f2 | |
parent | d3fe19852e96aabe3084c82ec2f3fb4918ab6d1e (diff) |
get rid of 'parent' argument of ->d_compare()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r-- | Documentation/filesystems/Locking | 2 | ||||
-rw-r--r-- | Documentation/filesystems/porting | 7 | ||||
-rw-r--r-- | Documentation/filesystems/vfs.txt | 2 | ||||
-rw-r--r-- | drivers/staging/lustre/lustre/llite/dcache.c | 2 | ||||
-rw-r--r-- | fs/adfs/dir.c | 2 | ||||
-rw-r--r-- | fs/affs/namei.c | 8 | ||||
-rw-r--r-- | fs/cifs/dir.c | 2 | ||||
-rw-r--r-- | fs/dcache.c | 4 | ||||
-rw-r--r-- | fs/efivarfs/super.c | 3 | ||||
-rw-r--r-- | fs/fat/namei_msdos.c | 2 | ||||
-rw-r--r-- | fs/fat/namei_vfat.c | 4 | ||||
-rw-r--r-- | fs/hfs/hfs_fs.h | 2 | ||||
-rw-r--r-- | fs/hfs/string.c | 2 | ||||
-rw-r--r-- | fs/hfsplus/hfsplus_fs.h | 3 | ||||
-rw-r--r-- | fs/hfsplus/unicode.c | 2 | ||||
-rw-r--r-- | fs/hpfs/dentry.c | 2 | ||||
-rw-r--r-- | fs/isofs/inode.c | 15 | ||||
-rw-r--r-- | fs/isofs/namei.c | 2 | ||||
-rw-r--r-- | fs/jfs/namei.c | 2 | ||||
-rw-r--r-- | fs/ncpfs/dir.c | 6 | ||||
-rw-r--r-- | fs/proc/proc_sysctl.c | 2 | ||||
-rw-r--r-- | include/linux/dcache.h | 2 |
22 files changed, 40 insertions, 38 deletions
diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking index 1b3c39a7de62..d30fb2cb5066 100644 --- a/Documentation/filesystems/Locking +++ b/Documentation/filesystems/Locking | |||
@@ -12,7 +12,7 @@ prototypes: | |||
12 | int (*d_revalidate)(struct dentry *, unsigned int); | 12 | int (*d_revalidate)(struct dentry *, unsigned int); |
13 | int (*d_weak_revalidate)(struct dentry *, unsigned int); | 13 | int (*d_weak_revalidate)(struct dentry *, unsigned int); |
14 | int (*d_hash)(const struct dentry *, struct qstr *); | 14 | int (*d_hash)(const struct dentry *, struct qstr *); |
15 | int (*d_compare)(const struct dentry *, const struct dentry *, | 15 | int (*d_compare)(const struct dentry *, |
16 | unsigned int, const char *, const struct qstr *); | 16 | unsigned int, const char *, const struct qstr *); |
17 | int (*d_delete)(struct dentry *); | 17 | int (*d_delete)(struct dentry *); |
18 | int (*d_init)(struct dentry *); | 18 | int (*d_init)(struct dentry *); |
diff --git a/Documentation/filesystems/porting b/Documentation/filesystems/porting index a5fb89cac615..b1bd05ea66b2 100644 --- a/Documentation/filesystems/porting +++ b/Documentation/filesystems/porting | |||
@@ -585,3 +585,10 @@ in your dentry operations instead. | |||
585 | in the instances. Rationale: !@#!@# security_d_instantiate() needs to be | 585 | in the instances. Rationale: !@#!@# security_d_instantiate() needs to be |
586 | called before we attach dentry to inode and !@#!@##!@$!$#!@#$!@$!@$ smack | 586 | called before we attach dentry to inode and !@#!@##!@$!$#!@#$!@$!@$ smack |
587 | ->d_instantiate() uses not just ->getxattr() but ->setxattr() as well. | 587 | ->d_instantiate() uses not just ->getxattr() but ->setxattr() as well. |
588 | -- | ||
589 | [mandatory] | ||
590 | ->d_compare() doesn't get parent as a separate argument anymore. If you | ||
591 | used it for finding the struct super_block involved, dentry->d_sb will | ||
592 | work just as well; if it's something more complicated, use dentry->d_parent. | ||
593 | Just be careful not to assume that fetching it more than once will yield | ||
594 | the same value - in RCU mode it could change under you. | ||
diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt index 8a196851f01d..9ace359d6cc5 100644 --- a/Documentation/filesystems/vfs.txt +++ b/Documentation/filesystems/vfs.txt | |||
@@ -931,7 +931,7 @@ struct dentry_operations { | |||
931 | int (*d_revalidate)(struct dentry *, unsigned int); | 931 | int (*d_revalidate)(struct dentry *, unsigned int); |
932 | int (*d_weak_revalidate)(struct dentry *, unsigned int); | 932 | int (*d_weak_revalidate)(struct dentry *, unsigned int); |
933 | int (*d_hash)(const struct dentry *, struct qstr *); | 933 | int (*d_hash)(const struct dentry *, struct qstr *); |
934 | int (*d_compare)(const struct dentry *, const struct dentry *, | 934 | int (*d_compare)(const struct dentry *, |
935 | unsigned int, const char *, const struct qstr *); | 935 | unsigned int, const char *, const struct qstr *); |
936 | int (*d_delete)(const struct dentry *); | 936 | int (*d_delete)(const struct dentry *); |
937 | int (*d_init)(struct dentry *); | 937 | int (*d_init)(struct dentry *); |
diff --git a/drivers/staging/lustre/lustre/llite/dcache.c b/drivers/staging/lustre/lustre/llite/dcache.c index 581a63a0a63e..463b1a360733 100644 --- a/drivers/staging/lustre/lustre/llite/dcache.c +++ b/drivers/staging/lustre/lustre/llite/dcache.c | |||
@@ -78,7 +78,7 @@ static void ll_release(struct dentry *de) | |||
78 | * INVALID) so d_lookup() matches it, but we have no lock on it (so | 78 | * INVALID) so d_lookup() matches it, but we have no lock on it (so |
79 | * lock_match() fails) and we spin around real_lookup(). | 79 | * lock_match() fails) and we spin around real_lookup(). |
80 | */ | 80 | */ |
81 | static int ll_dcompare(const struct dentry *parent, const struct dentry *dentry, | 81 | static int ll_dcompare(const struct dentry *dentry, |
82 | unsigned int len, const char *str, | 82 | unsigned int len, const char *str, |
83 | const struct qstr *name) | 83 | const struct qstr *name) |
84 | { | 84 | { |
diff --git a/fs/adfs/dir.c b/fs/adfs/dir.c index bec25f7017c0..c30a5a65cbb5 100644 --- a/fs/adfs/dir.c +++ b/fs/adfs/dir.c | |||
@@ -227,7 +227,7 @@ adfs_hash(const struct dentry *parent, struct qstr *qstr) | |||
227 | * requirements of the underlying filesystem. | 227 | * requirements of the underlying filesystem. |
228 | */ | 228 | */ |
229 | static int | 229 | static int |
230 | adfs_compare(const struct dentry *parent, const struct dentry *dentry, | 230 | adfs_compare(const struct dentry *dentry, |
231 | unsigned int len, const char *str, const struct qstr *name) | 231 | unsigned int len, const char *str, const struct qstr *name) |
232 | { | 232 | { |
233 | int i; | 233 | int i; |
diff --git a/fs/affs/namei.c b/fs/affs/namei.c index 27ca732680d9..a2d68f828d53 100644 --- a/fs/affs/namei.c +++ b/fs/affs/namei.c | |||
@@ -14,11 +14,11 @@ typedef int (*toupper_t)(int); | |||
14 | 14 | ||
15 | static int affs_toupper(int ch); | 15 | static int affs_toupper(int ch); |
16 | static int affs_hash_dentry(const struct dentry *, struct qstr *); | 16 | static int affs_hash_dentry(const struct dentry *, struct qstr *); |
17 | static int affs_compare_dentry(const struct dentry *parent, const struct dentry *dentry, | 17 | static int affs_compare_dentry(const struct dentry *dentry, |
18 | unsigned int len, const char *str, const struct qstr *name); | 18 | unsigned int len, const char *str, const struct qstr *name); |
19 | static int affs_intl_toupper(int ch); | 19 | static int affs_intl_toupper(int ch); |
20 | static int affs_intl_hash_dentry(const struct dentry *, struct qstr *); | 20 | static int affs_intl_hash_dentry(const struct dentry *, struct qstr *); |
21 | static int affs_intl_compare_dentry(const struct dentry *parent, const struct dentry *dentry, | 21 | static int affs_intl_compare_dentry(const struct dentry *dentry, |
22 | unsigned int len, const char *str, const struct qstr *name); | 22 | unsigned int len, const char *str, const struct qstr *name); |
23 | 23 | ||
24 | const struct dentry_operations affs_dentry_operations = { | 24 | const struct dentry_operations affs_dentry_operations = { |
@@ -131,7 +131,7 @@ static inline int __affs_compare_dentry(unsigned int len, | |||
131 | } | 131 | } |
132 | 132 | ||
133 | static int | 133 | static int |
134 | affs_compare_dentry(const struct dentry *parent, const struct dentry *dentry, | 134 | affs_compare_dentry(const struct dentry *dentry, |
135 | unsigned int len, const char *str, const struct qstr *name) | 135 | unsigned int len, const char *str, const struct qstr *name) |
136 | { | 136 | { |
137 | 137 | ||
@@ -140,7 +140,7 @@ affs_compare_dentry(const struct dentry *parent, const struct dentry *dentry, | |||
140 | } | 140 | } |
141 | 141 | ||
142 | static int | 142 | static int |
143 | affs_intl_compare_dentry(const struct dentry *parent, const struct dentry *dentry, | 143 | affs_intl_compare_dentry(const struct dentry *dentry, |
144 | unsigned int len, const char *str, const struct qstr *name) | 144 | unsigned int len, const char *str, const struct qstr *name) |
145 | { | 145 | { |
146 | return __affs_compare_dentry(len, str, name, affs_intl_toupper, | 146 | return __affs_compare_dentry(len, str, name, affs_intl_toupper, |
diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c index cf394da87cd4..4716c54dbfc6 100644 --- a/fs/cifs/dir.c +++ b/fs/cifs/dir.c | |||
@@ -903,7 +903,7 @@ static int cifs_ci_hash(const struct dentry *dentry, struct qstr *q) | |||
903 | return 0; | 903 | return 0; |
904 | } | 904 | } |
905 | 905 | ||
906 | static int cifs_ci_compare(const struct dentry *parent, const struct dentry *dentry, | 906 | static int cifs_ci_compare(const struct dentry *dentry, |
907 | unsigned int len, const char *str, const struct qstr *name) | 907 | unsigned int len, const char *str, const struct qstr *name) |
908 | { | 908 | { |
909 | struct nls_table *codepage = CIFS_SB(dentry->d_sb)->local_nls; | 909 | struct nls_table *codepage = CIFS_SB(dentry->d_sb)->local_nls; |
diff --git a/fs/dcache.c b/fs/dcache.c index d9450bd496ac..32a9209c8138 100644 --- a/fs/dcache.c +++ b/fs/dcache.c | |||
@@ -2047,7 +2047,7 @@ static inline bool d_same_name(const struct dentry *dentry, | |||
2047 | return false; | 2047 | return false; |
2048 | return dentry_cmp(dentry, name->name, name->len) == 0; | 2048 | return dentry_cmp(dentry, name->name, name->len) == 0; |
2049 | } | 2049 | } |
2050 | return parent->d_op->d_compare(parent, dentry, | 2050 | return parent->d_op->d_compare(dentry, |
2051 | dentry->d_name.len, dentry->d_name.name, | 2051 | dentry->d_name.len, dentry->d_name.name, |
2052 | name) == 0; | 2052 | name) == 0; |
2053 | } | 2053 | } |
@@ -2150,7 +2150,7 @@ seqretry: | |||
2150 | cpu_relax(); | 2150 | cpu_relax(); |
2151 | goto seqretry; | 2151 | goto seqretry; |
2152 | } | 2152 | } |
2153 | if (parent->d_op->d_compare(parent, dentry, | 2153 | if (parent->d_op->d_compare(dentry, |
2154 | tlen, tname, name) != 0) | 2154 | tlen, tname, name) != 0) |
2155 | continue; | 2155 | continue; |
2156 | } else { | 2156 | } else { |
diff --git a/fs/efivarfs/super.c b/fs/efivarfs/super.c index a5e607e8f056..688ccc16b702 100644 --- a/fs/efivarfs/super.c +++ b/fs/efivarfs/super.c | |||
@@ -45,8 +45,7 @@ static struct super_block *efivarfs_sb; | |||
45 | * So we need to perform a case-sensitive match on part 1 and a | 45 | * So we need to perform a case-sensitive match on part 1 and a |
46 | * case-insensitive match on part 2. | 46 | * case-insensitive match on part 2. |
47 | */ | 47 | */ |
48 | static int efivarfs_d_compare(const struct dentry *parent, | 48 | static int efivarfs_d_compare(const struct dentry *dentry, |
49 | const struct dentry *dentry, | ||
50 | unsigned int len, const char *str, | 49 | unsigned int len, const char *str, |
51 | const struct qstr *name) | 50 | const struct qstr *name) |
52 | { | 51 | { |
diff --git a/fs/fat/namei_msdos.c b/fs/fat/namei_msdos.c index 0f177127e4d6..664655b2c55f 100644 --- a/fs/fat/namei_msdos.c +++ b/fs/fat/namei_msdos.c | |||
@@ -162,7 +162,7 @@ static int msdos_hash(const struct dentry *dentry, struct qstr *qstr) | |||
162 | * Compare two msdos names. If either of the names are invalid, | 162 | * Compare two msdos names. If either of the names are invalid, |
163 | * we fall back to doing the standard name comparison. | 163 | * we fall back to doing the standard name comparison. |
164 | */ | 164 | */ |
165 | static int msdos_cmp(const struct dentry *parent, const struct dentry *dentry, | 165 | static int msdos_cmp(const struct dentry *dentry, |
166 | unsigned int len, const char *str, const struct qstr *name) | 166 | unsigned int len, const char *str, const struct qstr *name) |
167 | { | 167 | { |
168 | struct fat_mount_options *options = &MSDOS_SB(dentry->d_sb)->options; | 168 | struct fat_mount_options *options = &MSDOS_SB(dentry->d_sb)->options; |
diff --git a/fs/fat/namei_vfat.c b/fs/fat/namei_vfat.c index e60a90841381..0335e504e65a 100644 --- a/fs/fat/namei_vfat.c +++ b/fs/fat/namei_vfat.c | |||
@@ -138,7 +138,7 @@ static int vfat_hashi(const struct dentry *dentry, struct qstr *qstr) | |||
138 | /* | 138 | /* |
139 | * Case insensitive compare of two vfat names. | 139 | * Case insensitive compare of two vfat names. |
140 | */ | 140 | */ |
141 | static int vfat_cmpi(const struct dentry *parent, const struct dentry *dentry, | 141 | static int vfat_cmpi(const struct dentry *dentry, |
142 | unsigned int len, const char *str, const struct qstr *name) | 142 | unsigned int len, const char *str, const struct qstr *name) |
143 | { | 143 | { |
144 | struct nls_table *t = MSDOS_SB(dentry->d_sb)->nls_io; | 144 | struct nls_table *t = MSDOS_SB(dentry->d_sb)->nls_io; |
@@ -157,7 +157,7 @@ static int vfat_cmpi(const struct dentry *parent, const struct dentry *dentry, | |||
157 | /* | 157 | /* |
158 | * Case sensitive compare of two vfat names. | 158 | * Case sensitive compare of two vfat names. |
159 | */ | 159 | */ |
160 | static int vfat_cmp(const struct dentry *parent, const struct dentry *dentry, | 160 | static int vfat_cmp(const struct dentry *dentry, |
161 | unsigned int len, const char *str, const struct qstr *name) | 161 | unsigned int len, const char *str, const struct qstr *name) |
162 | { | 162 | { |
163 | unsigned int alen, blen; | 163 | unsigned int alen, blen; |
diff --git a/fs/hfs/hfs_fs.h b/fs/hfs/hfs_fs.h index ee2f385811c8..f28d7a259105 100644 --- a/fs/hfs/hfs_fs.h +++ b/fs/hfs/hfs_fs.h | |||
@@ -233,7 +233,7 @@ extern const struct dentry_operations hfs_dentry_operations; | |||
233 | extern int hfs_hash_dentry(const struct dentry *, struct qstr *); | 233 | extern int hfs_hash_dentry(const struct dentry *, struct qstr *); |
234 | extern int hfs_strcmp(const unsigned char *, unsigned int, | 234 | extern int hfs_strcmp(const unsigned char *, unsigned int, |
235 | const unsigned char *, unsigned int); | 235 | const unsigned char *, unsigned int); |
236 | extern int hfs_compare_dentry(const struct dentry *parent, const struct dentry *dentry, | 236 | extern int hfs_compare_dentry(const struct dentry *dentry, |
237 | unsigned int len, const char *str, const struct qstr *name); | 237 | unsigned int len, const char *str, const struct qstr *name); |
238 | 238 | ||
239 | /* trans.c */ | 239 | /* trans.c */ |
diff --git a/fs/hfs/string.c b/fs/hfs/string.c index ec9f164c35a5..3912209153a8 100644 --- a/fs/hfs/string.c +++ b/fs/hfs/string.c | |||
@@ -92,7 +92,7 @@ int hfs_strcmp(const unsigned char *s1, unsigned int len1, | |||
92 | * Test for equality of two strings in the HFS filename character ordering. | 92 | * Test for equality of two strings in the HFS filename character ordering. |
93 | * return 1 on failure and 0 on success | 93 | * return 1 on failure and 0 on success |
94 | */ | 94 | */ |
95 | int hfs_compare_dentry(const struct dentry *parent, const struct dentry *dentry, | 95 | int hfs_compare_dentry(const struct dentry *dentry, |
96 | unsigned int len, const char *str, const struct qstr *name) | 96 | unsigned int len, const char *str, const struct qstr *name) |
97 | { | 97 | { |
98 | const unsigned char *n1, *n2; | 98 | const unsigned char *n1, *n2; |
diff --git a/fs/hfsplus/hfsplus_fs.h b/fs/hfsplus/hfsplus_fs.h index 047245bd2cd6..e95c01f1d62e 100644 --- a/fs/hfsplus/hfsplus_fs.h +++ b/fs/hfsplus/hfsplus_fs.h | |||
@@ -520,8 +520,7 @@ int hfsplus_uni2asc(struct super_block *sb, const struct hfsplus_unistr *ustr, | |||
520 | int hfsplus_asc2uni(struct super_block *sb, struct hfsplus_unistr *ustr, | 520 | int hfsplus_asc2uni(struct super_block *sb, struct hfsplus_unistr *ustr, |
521 | int max_unistr_len, const char *astr, int len); | 521 | int max_unistr_len, const char *astr, int len); |
522 | int hfsplus_hash_dentry(const struct dentry *dentry, struct qstr *str); | 522 | int hfsplus_hash_dentry(const struct dentry *dentry, struct qstr *str); |
523 | int hfsplus_compare_dentry(const struct dentry *parent, | 523 | int hfsplus_compare_dentry(const struct dentry *dentry, unsigned int len, |
524 | const struct dentry *dentry, unsigned int len, | ||
525 | const char *str, const struct qstr *name); | 524 | const char *str, const struct qstr *name); |
526 | 525 | ||
527 | /* wrapper.c */ | 526 | /* wrapper.c */ |
diff --git a/fs/hfsplus/unicode.c b/fs/hfsplus/unicode.c index 509d7e231460..e563939882f3 100644 --- a/fs/hfsplus/unicode.c +++ b/fs/hfsplus/unicode.c | |||
@@ -385,7 +385,7 @@ int hfsplus_hash_dentry(const struct dentry *dentry, struct qstr *str) | |||
385 | * Composed unicode characters are decomposed and case-folding is performed | 385 | * Composed unicode characters are decomposed and case-folding is performed |
386 | * if the appropriate bits are (un)set on the superblock. | 386 | * if the appropriate bits are (un)set on the superblock. |
387 | */ | 387 | */ |
388 | int hfsplus_compare_dentry(const struct dentry *parent, const struct dentry *dentry, | 388 | int hfsplus_compare_dentry(const struct dentry *dentry, |
389 | unsigned int len, const char *str, const struct qstr *name) | 389 | unsigned int len, const char *str, const struct qstr *name) |
390 | { | 390 | { |
391 | struct super_block *sb = dentry->d_sb; | 391 | struct super_block *sb = dentry->d_sb; |
diff --git a/fs/hpfs/dentry.c b/fs/hpfs/dentry.c index a804300f4dce..bb87d65f0d97 100644 --- a/fs/hpfs/dentry.c +++ b/fs/hpfs/dentry.c | |||
@@ -34,7 +34,7 @@ static int hpfs_hash_dentry(const struct dentry *dentry, struct qstr *qstr) | |||
34 | return 0; | 34 | return 0; |
35 | } | 35 | } |
36 | 36 | ||
37 | static int hpfs_compare_dentry(const struct dentry *parent, const struct dentry *dentry, | 37 | static int hpfs_compare_dentry(const struct dentry *dentry, |
38 | unsigned int len, const char *str, const struct qstr *name) | 38 | unsigned int len, const char *str, const struct qstr *name) |
39 | { | 39 | { |
40 | unsigned al = len; | 40 | unsigned al = len; |
diff --git a/fs/isofs/inode.c b/fs/isofs/inode.c index 761fade7680f..ad0c745ebad7 100644 --- a/fs/isofs/inode.c +++ b/fs/isofs/inode.c | |||
@@ -29,18 +29,15 @@ | |||
29 | #define BEQUIET | 29 | #define BEQUIET |
30 | 30 | ||
31 | static int isofs_hashi(const struct dentry *parent, struct qstr *qstr); | 31 | static int isofs_hashi(const struct dentry *parent, struct qstr *qstr); |
32 | static int isofs_dentry_cmpi(const struct dentry *parent, | 32 | static int isofs_dentry_cmpi(const struct dentry *dentry, |
33 | const struct dentry *dentry, | ||
34 | unsigned int len, const char *str, const struct qstr *name); | 33 | unsigned int len, const char *str, const struct qstr *name); |
35 | 34 | ||
36 | #ifdef CONFIG_JOLIET | 35 | #ifdef CONFIG_JOLIET |
37 | static int isofs_hashi_ms(const struct dentry *parent, struct qstr *qstr); | 36 | static int isofs_hashi_ms(const struct dentry *parent, struct qstr *qstr); |
38 | static int isofs_hash_ms(const struct dentry *parent, struct qstr *qstr); | 37 | static int isofs_hash_ms(const struct dentry *parent, struct qstr *qstr); |
39 | static int isofs_dentry_cmpi_ms(const struct dentry *parent, | 38 | static int isofs_dentry_cmpi_ms(const struct dentry *dentry, |
40 | const struct dentry *dentry, | ||
41 | unsigned int len, const char *str, const struct qstr *name); | 39 | unsigned int len, const char *str, const struct qstr *name); |
42 | static int isofs_dentry_cmp_ms(const struct dentry *parent, | 40 | static int isofs_dentry_cmp_ms(const struct dentry *dentry, |
43 | const struct dentry *dentry, | ||
44 | unsigned int len, const char *str, const struct qstr *name); | 41 | unsigned int len, const char *str, const struct qstr *name); |
45 | #endif | 42 | #endif |
46 | 43 | ||
@@ -235,7 +232,7 @@ isofs_hashi(const struct dentry *dentry, struct qstr *qstr) | |||
235 | } | 232 | } |
236 | 233 | ||
237 | static int | 234 | static int |
238 | isofs_dentry_cmpi(const struct dentry *parent, const struct dentry *dentry, | 235 | isofs_dentry_cmpi(const struct dentry *dentry, |
239 | unsigned int len, const char *str, const struct qstr *name) | 236 | unsigned int len, const char *str, const struct qstr *name) |
240 | { | 237 | { |
241 | return isofs_dentry_cmp_common(len, str, name, 0, 1); | 238 | return isofs_dentry_cmp_common(len, str, name, 0, 1); |
@@ -276,14 +273,14 @@ isofs_hashi_ms(const struct dentry *dentry, struct qstr *qstr) | |||
276 | } | 273 | } |
277 | 274 | ||
278 | static int | 275 | static int |
279 | isofs_dentry_cmp_ms(const struct dentry *parent, const struct dentry *dentry, | 276 | isofs_dentry_cmp_ms(const struct dentry *dentry, |
280 | unsigned int len, const char *str, const struct qstr *name) | 277 | unsigned int len, const char *str, const struct qstr *name) |
281 | { | 278 | { |
282 | return isofs_dentry_cmp_common(len, str, name, 1, 0); | 279 | return isofs_dentry_cmp_common(len, str, name, 1, 0); |
283 | } | 280 | } |
284 | 281 | ||
285 | static int | 282 | static int |
286 | isofs_dentry_cmpi_ms(const struct dentry *parent, const struct dentry *dentry, | 283 | isofs_dentry_cmpi_ms(const struct dentry *dentry, |
287 | unsigned int len, const char *str, const struct qstr *name) | 284 | unsigned int len, const char *str, const struct qstr *name) |
288 | { | 285 | { |
289 | return isofs_dentry_cmp_common(len, str, name, 1, 1); | 286 | return isofs_dentry_cmp_common(len, str, name, 1, 1); |
diff --git a/fs/isofs/namei.c b/fs/isofs/namei.c index 7b543e6b6526..aee592767f1d 100644 --- a/fs/isofs/namei.c +++ b/fs/isofs/namei.c | |||
@@ -22,7 +22,7 @@ isofs_cmp(struct dentry *dentry, const char *compare, int dlen) | |||
22 | qstr.len = dlen; | 22 | qstr.len = dlen; |
23 | if (likely(!dentry->d_op)) | 23 | if (likely(!dentry->d_op)) |
24 | return dentry->d_name.len != dlen || memcmp(dentry->d_name.name, compare, dlen); | 24 | return dentry->d_name.len != dlen || memcmp(dentry->d_name.name, compare, dlen); |
25 | return dentry->d_op->d_compare(NULL, NULL, dentry->d_name.len, dentry->d_name.name, &qstr); | 25 | return dentry->d_op->d_compare(NULL, dentry->d_name.len, dentry->d_name.name, &qstr); |
26 | } | 26 | } |
27 | 27 | ||
28 | /* | 28 | /* |
diff --git a/fs/jfs/namei.c b/fs/jfs/namei.c index 04baf0dfc40c..814b0c58016c 100644 --- a/fs/jfs/namei.c +++ b/fs/jfs/namei.c | |||
@@ -1572,7 +1572,7 @@ static int jfs_ci_hash(const struct dentry *dir, struct qstr *this) | |||
1572 | return 0; | 1572 | return 0; |
1573 | } | 1573 | } |
1574 | 1574 | ||
1575 | static int jfs_ci_compare(const struct dentry *parent, const struct dentry *dentry, | 1575 | static int jfs_ci_compare(const struct dentry *dentry, |
1576 | unsigned int len, const char *str, const struct qstr *name) | 1576 | unsigned int len, const char *str, const struct qstr *name) |
1577 | { | 1577 | { |
1578 | int i, result = 1; | 1578 | int i, result = 1; |
diff --git a/fs/ncpfs/dir.c b/fs/ncpfs/dir.c index 9add7ab747a5..17de5c13dfae 100644 --- a/fs/ncpfs/dir.c +++ b/fs/ncpfs/dir.c | |||
@@ -74,7 +74,7 @@ const struct inode_operations ncp_dir_inode_operations = | |||
74 | */ | 74 | */ |
75 | static int ncp_lookup_validate(struct dentry *, unsigned int); | 75 | static int ncp_lookup_validate(struct dentry *, unsigned int); |
76 | static int ncp_hash_dentry(const struct dentry *, struct qstr *); | 76 | static int ncp_hash_dentry(const struct dentry *, struct qstr *); |
77 | static int ncp_compare_dentry(const struct dentry *, const struct dentry *, | 77 | static int ncp_compare_dentry(const struct dentry *, |
78 | unsigned int, const char *, const struct qstr *); | 78 | unsigned int, const char *, const struct qstr *); |
79 | static int ncp_delete_dentry(const struct dentry *); | 79 | static int ncp_delete_dentry(const struct dentry *); |
80 | static void ncp_d_prune(struct dentry *dentry); | 80 | static void ncp_d_prune(struct dentry *dentry); |
@@ -154,7 +154,7 @@ ncp_hash_dentry(const struct dentry *dentry, struct qstr *this) | |||
154 | * the callers will handle races. | 154 | * the callers will handle races. |
155 | */ | 155 | */ |
156 | static int | 156 | static int |
157 | ncp_compare_dentry(const struct dentry *parent, const struct dentry *dentry, | 157 | ncp_compare_dentry(const struct dentry *dentry, |
158 | unsigned int len, const char *str, const struct qstr *name) | 158 | unsigned int len, const char *str, const struct qstr *name) |
159 | { | 159 | { |
160 | struct inode *pinode; | 160 | struct inode *pinode; |
@@ -162,7 +162,7 @@ ncp_compare_dentry(const struct dentry *parent, const struct dentry *dentry, | |||
162 | if (len != name->len) | 162 | if (len != name->len) |
163 | return 1; | 163 | return 1; |
164 | 164 | ||
165 | pinode = d_inode_rcu(parent); | 165 | pinode = d_inode_rcu(dentry->d_parent); |
166 | if (!pinode) | 166 | if (!pinode) |
167 | return 1; | 167 | return 1; |
168 | 168 | ||
diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c index b59db94d2ff4..30bb00130d0f 100644 --- a/fs/proc/proc_sysctl.c +++ b/fs/proc/proc_sysctl.c | |||
@@ -834,7 +834,7 @@ static int sysctl_is_seen(struct ctl_table_header *p) | |||
834 | return res; | 834 | return res; |
835 | } | 835 | } |
836 | 836 | ||
837 | static int proc_sys_compare(const struct dentry *parent, const struct dentry *dentry, | 837 | static int proc_sys_compare(const struct dentry *dentry, |
838 | unsigned int len, const char *str, const struct qstr *name) | 838 | unsigned int len, const char *str, const struct qstr *name) |
839 | { | 839 | { |
840 | struct ctl_table_header *head; | 840 | struct ctl_table_header *head; |
diff --git a/include/linux/dcache.h b/include/linux/dcache.h index 98044a8d1487..107d9abe7166 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h | |||
@@ -130,7 +130,7 @@ struct dentry_operations { | |||
130 | int (*d_revalidate)(struct dentry *, unsigned int); | 130 | int (*d_revalidate)(struct dentry *, unsigned int); |
131 | int (*d_weak_revalidate)(struct dentry *, unsigned int); | 131 | int (*d_weak_revalidate)(struct dentry *, unsigned int); |
132 | int (*d_hash)(const struct dentry *, struct qstr *); | 132 | int (*d_hash)(const struct dentry *, struct qstr *); |
133 | int (*d_compare)(const struct dentry *, const struct dentry *, | 133 | int (*d_compare)(const struct dentry *, |
134 | unsigned int, const char *, const struct qstr *); | 134 | unsigned int, const char *, const struct qstr *); |
135 | int (*d_delete)(const struct dentry *); | 135 | int (*d_delete)(const struct dentry *); |
136 | int (*d_init)(struct dentry *); | 136 | int (*d_init)(struct dentry *); |