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>
This commit is contained in:

committed by
Linus Torvalds

parent
eeb36f8e93
commit
f157853e40
@@ -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);
|
||||
|
Reference in New Issue
Block a user