aboutsummaryrefslogtreecommitdiffstats
path: root/fs/isofs
diff options
context:
space:
mode:
authorNick Piggin <npiggin@kernel.dk>2011-01-07 01:49:28 -0500
committerNick Piggin <npiggin@kernel.dk>2011-01-07 01:50:20 -0500
commitb1e6a015a580ad145689ad1d6b4aa0e03e6c868b (patch)
tree57a10ef164e4d2f798d9b832dbeaf973aca2ab83 /fs/isofs
parent621e155a3591962420eacdd39f6f0aa29ceb221e (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.c28
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
29static int isofs_hashi(struct dentry *parent, struct qstr *qstr); 29static int isofs_hashi(const struct dentry *parent, const struct inode *inode,
30static int isofs_hash(struct dentry *parent, struct qstr *qstr); 30 struct qstr *qstr);
31static int isofs_hash(const struct dentry *parent, const struct inode *inode,
32 struct qstr *qstr);
31static int isofs_dentry_cmpi(const struct dentry *parent, 33static 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
41static int isofs_hashi_ms(struct dentry *parent, struct qstr *qstr); 43static int isofs_hashi_ms(const struct dentry *parent, const struct inode *inode,
42static int isofs_hash_ms(struct dentry *parent, struct qstr *qstr); 44 struct qstr *qstr);
45static int isofs_hash_ms(const struct dentry *parent, const struct inode *inode,
46 struct qstr *qstr);
43static int isofs_dentry_cmpi_ms(const struct dentry *parent, 47static 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 */
174static int 178static int
175isofs_hash_common(struct dentry *dentry, struct qstr *qstr, int ms) 179isofs_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 */
195static int 199static int
196isofs_hashi_common(struct dentry *dentry, struct qstr *qstr, int ms) 200isofs_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
250static int 254static int
251isofs_hash(struct dentry *dentry, struct qstr *qstr) 255isofs_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
256static int 261static int
257isofs_hashi(struct dentry *dentry, struct qstr *qstr) 262isofs_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
279static int 285static int
280isofs_hash_ms(struct dentry *dentry, struct qstr *qstr) 286isofs_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
285static int 292static int
286isofs_hashi_ms(struct dentry *dentry, struct qstr *qstr) 293isofs_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}