aboutsummaryrefslogtreecommitdiffstats
path: root/fs/affs
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/affs
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/affs')
-rw-r--r--fs/affs/namei.c20
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 @@
13typedef int (*toupper_t)(int); 13typedef int (*toupper_t)(int);
14 14
15static int affs_toupper(int ch); 15static int affs_toupper(int ch);
16static int affs_hash_dentry(struct dentry *, struct qstr *); 16static int affs_hash_dentry(const struct dentry *,
17 const struct inode *, struct qstr *);
17static int affs_compare_dentry(const struct dentry *parent, 18static 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);
21static int affs_intl_toupper(int ch); 22static int affs_intl_toupper(int ch);
22static int affs_intl_hash_dentry(struct dentry *, struct qstr *); 23static int affs_intl_hash_dentry(const struct dentry *,
24 const struct inode *, struct qstr *);
23static int affs_intl_compare_dentry(const struct dentry *parent, 25static 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 */
66static inline int 68static 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
86static int 88static int
87affs_hash_dentry(struct dentry *dentry, struct qstr *qstr) 89affs_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}
91static int 94static int
92affs_intl_hash_dentry(struct dentry *dentry, struct qstr *qstr) 95affs_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
97static inline int __affs_compare_dentry(unsigned int len, 101static inline int __affs_compare_dentry(unsigned int len,