aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2014-11-19 09:11:24 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2014-11-19 13:09:37 -0500
commit7ca2f234404e738cc807ed87c43f9932513bc8c6 (patch)
tree17b9a0eeb1230a42ae67e11f361aff37b652804b /fs
parent4a7795d35e252f38298980530e01e21867f8f856 (diff)
isofs: avoid unused function warning
With the isofs_hash() function removed, isofs_hash_ms() is the only user of isofs_hash_common(), but it's defined inside of an #ifdef, which triggers this gcc warning in ARM axm55xx_defconfig starting with v3.18-rc3: fs/isofs/inode.c:177:1: warning: 'isofs_hash_common' defined but not used [-Wunused-function] This patch moves the function inside of the same #ifdef section to avoid that warning, which seems the best compromise of a relatively harmless patch for a late -rc. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Fixes: b0afd8e5db7b ("isofs: don't bother with ->d_op for normal case") Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs')
-rw-r--r--fs/isofs/inode.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/fs/isofs/inode.c b/fs/isofs/inode.c
index fe839b915116..d67a16f2a45d 100644
--- a/fs/isofs/inode.c
+++ b/fs/isofs/inode.c
@@ -174,27 +174,6 @@ struct iso9660_options{
174 * Compute the hash for the isofs name corresponding to the dentry. 174 * Compute the hash for the isofs name corresponding to the dentry.
175 */ 175 */
176static int 176static int
177isofs_hash_common(struct qstr *qstr, int ms)
178{
179 const char *name;
180 int len;
181
182 len = qstr->len;
183 name = qstr->name;
184 if (ms) {
185 while (len && name[len-1] == '.')
186 len--;
187 }
188
189 qstr->hash = full_name_hash(name, len);
190
191 return 0;
192}
193
194/*
195 * Compute the hash for the isofs name corresponding to the dentry.
196 */
197static int
198isofs_hashi_common(struct qstr *qstr, int ms) 177isofs_hashi_common(struct qstr *qstr, int ms)
199{ 178{
200 const char *name; 179 const char *name;
@@ -263,6 +242,27 @@ isofs_dentry_cmpi(const struct dentry *parent, const struct dentry *dentry,
263} 242}
264 243
265#ifdef CONFIG_JOLIET 244#ifdef CONFIG_JOLIET
245/*
246 * Compute the hash for the isofs name corresponding to the dentry.
247 */
248static int
249isofs_hash_common(struct qstr *qstr, int ms)
250{
251 const char *name;
252 int len;
253
254 len = qstr->len;
255 name = qstr->name;
256 if (ms) {
257 while (len && name[len-1] == '.')
258 len--;
259 }
260
261 qstr->hash = full_name_hash(name, len);
262
263 return 0;
264}
265
266static int 266static int
267isofs_hash_ms(const struct dentry *dentry, struct qstr *qstr) 267isofs_hash_ms(const struct dentry *dentry, struct qstr *qstr)
268{ 268{