summaryrefslogtreecommitdiffstats
path: root/fs/affs/dir.c
diff options
context:
space:
mode:
authorFabian Frederick <fabf@skynet.be>2015-02-17 13:46:23 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2015-02-17 14:34:52 -0800
commitf157853e407c0611cd6acbc400fa6c7be420b1bd (patch)
treec8ee0adacfd4b798228d0ccd65de3f3ec0ce24d5 /fs/affs/dir.c
parenteeb36f8e938d151fc5e12e96ae13d0e283be357e (diff)
downloadtalos-obmc-linux-f157853e407c0611cd6acbc400fa6c7be420b1bd.tar.gz
talos-obmc-linux-f157853e407c0611cd6acbc400fa6c7be420b1bd.zip
fs/affs: define AFFSNAMEMAX to replace constant use
30 was used all over the place to compare name length against AFFS maximum name length. Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/affs/dir.c')
-rw-r--r--fs/affs/dir.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/affs/dir.c b/fs/affs/dir.c
index a682892878a8..ac4f318aafba 100644
--- a/fs/affs/dir.c
+++ b/fs/affs/dir.c
@@ -114,7 +114,8 @@ inside:
break;
}
- namelen = min(AFFS_TAIL(sb, fh_bh)->name[0], (u8)30);
+ namelen = min(AFFS_TAIL(sb, fh_bh)->name[0],
+ (u8)AFFSNAMEMAX);
name = AFFS_TAIL(sb, fh_bh)->name + 1;
pr_debug("readdir(): dir_emit(\"%.*s\", ino=%u), hash=%d, f_pos=%llx\n",
namelen, name, ino, hash_pos, ctx->pos);
OpenPOWER on IntegriCloud