aboutsummaryrefslogtreecommitdiffstats
path: root/fs/fat
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/fat
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/fat')
-rw-r--r--fs/fat/namei_msdos.c3
-rw-r--r--fs/fat/namei_vfat.c8
2 files changed, 7 insertions, 4 deletions
diff --git a/fs/fat/namei_msdos.c b/fs/fat/namei_msdos.c
index 99d3c7ac973c..3b3e072d8982 100644
--- a/fs/fat/namei_msdos.c
+++ b/fs/fat/namei_msdos.c
@@ -148,7 +148,8 @@ static int msdos_find(struct inode *dir, const unsigned char *name, int len,
148 * that the existing dentry can be used. The msdos fs routines will 148 * that the existing dentry can be used. The msdos fs routines will
149 * return ENOENT or EINVAL as appropriate. 149 * return ENOENT or EINVAL as appropriate.
150 */ 150 */
151static int msdos_hash(struct dentry *dentry, struct qstr *qstr) 151static int msdos_hash(const struct dentry *dentry, const struct inode *inode,
152 struct qstr *qstr)
152{ 153{
153 struct fat_mount_options *options = &MSDOS_SB(dentry->d_sb)->options; 154 struct fat_mount_options *options = &MSDOS_SB(dentry->d_sb)->options;
154 unsigned char msdos_name[MSDOS_NAME]; 155 unsigned char msdos_name[MSDOS_NAME];
diff --git a/fs/fat/namei_vfat.c b/fs/fat/namei_vfat.c
index 95e00ab84c3f..4fc06278db48 100644
--- a/fs/fat/namei_vfat.c
+++ b/fs/fat/namei_vfat.c
@@ -103,7 +103,8 @@ static unsigned int vfat_striptail_len(const struct qstr *qstr)
103 * that the existing dentry can be used. The vfat fs routines will 103 * that the existing dentry can be used. The vfat fs routines will
104 * return ENOENT or EINVAL as appropriate. 104 * return ENOENT or EINVAL as appropriate.
105 */ 105 */
106static int vfat_hash(struct dentry *dentry, struct qstr *qstr) 106static int vfat_hash(const struct dentry *dentry, const struct inode *inode,
107 struct qstr *qstr)
107{ 108{
108 qstr->hash = full_name_hash(qstr->name, vfat_striptail_len(qstr)); 109 qstr->hash = full_name_hash(qstr->name, vfat_striptail_len(qstr));
109 return 0; 110 return 0;
@@ -115,9 +116,10 @@ static int vfat_hash(struct dentry *dentry, struct qstr *qstr)
115 * that the existing dentry can be used. The vfat fs routines will 116 * that the existing dentry can be used. The vfat fs routines will
116 * return ENOENT or EINVAL as appropriate. 117 * return ENOENT or EINVAL as appropriate.
117 */ 118 */
118static int vfat_hashi(struct dentry *dentry, struct qstr *qstr) 119static int vfat_hashi(const struct dentry *dentry, const struct inode *inode,
120 struct qstr *qstr)
119{ 121{
120 struct nls_table *t = MSDOS_SB(dentry->d_inode->i_sb)->nls_io; 122 struct nls_table *t = MSDOS_SB(dentry->d_sb)->nls_io;
121 const unsigned char *name; 123 const unsigned char *name;
122 unsigned int len; 124 unsigned int len;
123 unsigned long hash; 125 unsigned long hash;