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/affs | |
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/affs')
-rw-r--r-- | fs/affs/namei.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/fs/affs/namei.c b/fs/affs/namei.c index 547d5deb0d42..5aca08c21100 100644 --- a/fs/affs/namei.c +++ b/fs/affs/namei.c | |||
@@ -13,13 +13,15 @@ | |||
13 | typedef int (*toupper_t)(int); | 13 | 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(struct dentry *, struct qstr *); | 16 | static int affs_hash_dentry(const struct dentry *, |
17 | const struct inode *, struct qstr *); | ||
17 | static int affs_compare_dentry(const struct dentry *parent, | 18 | static int affs_compare_dentry(const struct dentry *parent, |
18 | const struct inode *pinode, | 19 | const struct inode *pinode, |
19 | const struct dentry *dentry, const struct inode *inode, | 20 | const struct dentry *dentry, const struct inode *inode, |
20 | unsigned int len, const char *str, const struct qstr *name); | 21 | unsigned int len, const char *str, const struct qstr *name); |
21 | static int affs_intl_toupper(int ch); | 22 | static int affs_intl_toupper(int ch); |
22 | static int affs_intl_hash_dentry(struct dentry *, struct qstr *); | 23 | static int affs_intl_hash_dentry(const struct dentry *, |
24 | const struct inode *, struct qstr *); | ||
23 | static int affs_intl_compare_dentry(const struct dentry *parent, | 25 | static int affs_intl_compare_dentry(const struct dentry *parent, |
24 | const struct inode *pinode, | 26 | const struct inode *pinode, |
25 | const struct dentry *dentry, const struct inode *inode, | 27 | const struct dentry *dentry, const struct inode *inode, |
@@ -64,13 +66,13 @@ affs_get_toupper(struct super_block *sb) | |||
64 | * Note: the dentry argument is the parent dentry. | 66 | * Note: the dentry argument is the parent dentry. |
65 | */ | 67 | */ |
66 | static inline int | 68 | static inline int |
67 | __affs_hash_dentry(struct dentry *dentry, struct qstr *qstr, toupper_t toupper) | 69 | __affs_hash_dentry(struct qstr *qstr, toupper_t toupper) |
68 | { | 70 | { |
69 | const u8 *name = qstr->name; | 71 | const u8 *name = qstr->name; |
70 | unsigned long hash; | 72 | unsigned long hash; |
71 | int i; | 73 | int i; |
72 | 74 | ||
73 | i = affs_check_name(qstr->name,qstr->len); | 75 | i = affs_check_name(qstr->name, qstr->len); |
74 | if (i) | 76 | if (i) |
75 | return i; | 77 | return i; |
76 | 78 | ||
@@ -84,14 +86,16 @@ __affs_hash_dentry(struct dentry *dentry, struct qstr *qstr, toupper_t toupper) | |||
84 | } | 86 | } |
85 | 87 | ||
86 | static int | 88 | static int |
87 | affs_hash_dentry(struct dentry *dentry, struct qstr *qstr) | 89 | affs_hash_dentry(const struct dentry *dentry, const struct inode *inode, |
90 | struct qstr *qstr) | ||
88 | { | 91 | { |
89 | return __affs_hash_dentry(dentry, qstr, affs_toupper); | 92 | return __affs_hash_dentry(qstr, affs_toupper); |
90 | } | 93 | } |
91 | static int | 94 | static int |
92 | affs_intl_hash_dentry(struct dentry *dentry, struct qstr *qstr) | 95 | affs_intl_hash_dentry(const struct dentry *dentry, const struct inode *inode, |
96 | struct qstr *qstr) | ||
93 | { | 97 | { |
94 | return __affs_hash_dentry(dentry, qstr, affs_intl_toupper); | 98 | return __affs_hash_dentry(qstr, affs_intl_toupper); |
95 | } | 99 | } |
96 | 100 | ||
97 | static inline int __affs_compare_dentry(unsigned int len, | 101 | static inline int __affs_compare_dentry(unsigned int len, |