diff options
author | Nick Piggin <npiggin@kernel.dk> | 2011-01-07 01:49:28 -0500 |
---|---|---|
committer | Nick Piggin <npiggin@kernel.dk> | 2011-01-07 01:50:20 -0500 |
commit | b1e6a015a580ad145689ad1d6b4aa0e03e6c868b (patch) | |
tree | 57a10ef164e4d2f798d9b832dbeaf973aca2ab83 /fs/isofs | |
parent | 621e155a3591962420eacdd39f6f0aa29ceb221e (diff) |
fs: change d_hash for rcu-walk
Change d_hash so it may be called from lock-free RCU lookups. See similar
patch for d_compare for details.
For in-tree filesystems, this is just a mechanical change.
Signed-off-by: Nick Piggin <npiggin@kernel.dk>
Diffstat (limited to 'fs/isofs')
-rw-r--r-- | fs/isofs/inode.c | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/fs/isofs/inode.c b/fs/isofs/inode.c index 7b0fbc61af81..d204ee4235fd 100644 --- a/fs/isofs/inode.c +++ b/fs/isofs/inode.c | |||
@@ -26,8 +26,10 @@ | |||
26 | 26 | ||
27 | #define BEQUIET | 27 | #define BEQUIET |
28 | 28 | ||
29 | static int isofs_hashi(struct dentry *parent, struct qstr *qstr); | 29 | static int isofs_hashi(const struct dentry *parent, const struct inode *inode, |
30 | static int isofs_hash(struct dentry *parent, struct qstr *qstr); | 30 | struct qstr *qstr); |
31 | static int isofs_hash(const struct dentry *parent, const struct inode *inode, | ||
32 | struct qstr *qstr); | ||
31 | static int isofs_dentry_cmpi(const struct dentry *parent, | 33 | static int isofs_dentry_cmpi(const struct dentry *parent, |
32 | const struct inode *pinode, | 34 | const struct inode *pinode, |
33 | const struct dentry *dentry, const struct inode *inode, | 35 | const struct dentry *dentry, const struct inode *inode, |
@@ -38,8 +40,10 @@ static int isofs_dentry_cmp(const struct dentry *parent, | |||
38 | unsigned int len, const char *str, const struct qstr *name); | 40 | unsigned int len, const char *str, const struct qstr *name); |
39 | 41 | ||
40 | #ifdef CONFIG_JOLIET | 42 | #ifdef CONFIG_JOLIET |
41 | static int isofs_hashi_ms(struct dentry *parent, struct qstr *qstr); | 43 | static int isofs_hashi_ms(const struct dentry *parent, const struct inode *inode, |
42 | static int isofs_hash_ms(struct dentry *parent, struct qstr *qstr); | 44 | struct qstr *qstr); |
45 | static int isofs_hash_ms(const struct dentry *parent, const struct inode *inode, | ||
46 | struct qstr *qstr); | ||
43 | static int isofs_dentry_cmpi_ms(const struct dentry *parent, | 47 | static int isofs_dentry_cmpi_ms(const struct dentry *parent, |
44 | const struct inode *pinode, | 48 | const struct inode *pinode, |
45 | const struct dentry *dentry, const struct inode *inode, | 49 | const struct dentry *dentry, const struct inode *inode, |
@@ -172,7 +176,7 @@ struct iso9660_options{ | |||
172 | * Compute the hash for the isofs name corresponding to the dentry. | 176 | * Compute the hash for the isofs name corresponding to the dentry. |
173 | */ | 177 | */ |
174 | static int | 178 | static int |
175 | isofs_hash_common(struct dentry *dentry, struct qstr *qstr, int ms) | 179 | isofs_hash_common(const struct dentry *dentry, struct qstr *qstr, int ms) |
176 | { | 180 | { |
177 | const char *name; | 181 | const char *name; |
178 | int len; | 182 | int len; |
@@ -193,7 +197,7 @@ isofs_hash_common(struct dentry *dentry, struct qstr *qstr, int ms) | |||
193 | * Compute the hash for the isofs name corresponding to the dentry. | 197 | * Compute the hash for the isofs name corresponding to the dentry. |
194 | */ | 198 | */ |
195 | static int | 199 | static int |
196 | isofs_hashi_common(struct dentry *dentry, struct qstr *qstr, int ms) | 200 | isofs_hashi_common(const struct dentry *dentry, struct qstr *qstr, int ms) |
197 | { | 201 | { |
198 | const char *name; | 202 | const char *name; |
199 | int len; | 203 | int len; |
@@ -248,13 +252,15 @@ static int isofs_dentry_cmp_common( | |||
248 | } | 252 | } |
249 | 253 | ||
250 | static int | 254 | static int |
251 | isofs_hash(struct dentry *dentry, struct qstr *qstr) | 255 | isofs_hash(const struct dentry *dentry, const struct inode *inode, |
256 | struct qstr *qstr) | ||
252 | { | 257 | { |
253 | return isofs_hash_common(dentry, qstr, 0); | 258 | return isofs_hash_common(dentry, qstr, 0); |
254 | } | 259 | } |
255 | 260 | ||
256 | static int | 261 | static int |
257 | isofs_hashi(struct dentry *dentry, struct qstr *qstr) | 262 | isofs_hashi(const struct dentry *dentry, const struct inode *inode, |
263 | struct qstr *qstr) | ||
258 | { | 264 | { |
259 | return isofs_hashi_common(dentry, qstr, 0); | 265 | return isofs_hashi_common(dentry, qstr, 0); |
260 | } | 266 | } |
@@ -277,13 +283,15 @@ isofs_dentry_cmpi(const struct dentry *parent, const struct inode *pinode, | |||
277 | 283 | ||
278 | #ifdef CONFIG_JOLIET | 284 | #ifdef CONFIG_JOLIET |
279 | static int | 285 | static int |
280 | isofs_hash_ms(struct dentry *dentry, struct qstr *qstr) | 286 | isofs_hash_ms(const struct dentry *dentry, const struct inode *inode, |
287 | struct qstr *qstr) | ||
281 | { | 288 | { |
282 | return isofs_hash_common(dentry, qstr, 1); | 289 | return isofs_hash_common(dentry, qstr, 1); |
283 | } | 290 | } |
284 | 291 | ||
285 | static int | 292 | static int |
286 | isofs_hashi_ms(struct dentry *dentry, struct qstr *qstr) | 293 | isofs_hashi_ms(const struct dentry *dentry, const struct inode *inode, |
294 | struct qstr *qstr) | ||
287 | { | 295 | { |
288 | return isofs_hashi_common(dentry, qstr, 1); | 296 | return isofs_hashi_common(dentry, qstr, 1); |
289 | } | 297 | } |