diff options
author | OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> | 2005-10-30 18:03:49 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-10-30 20:37:32 -0500 |
commit | 451cbaa1c328082832a8fbcc427cd4416c602c5a (patch) | |
tree | 139c3d33d0cf3f9eba214c504e4173f54c6cf66d /fs/vfat/namei.c | |
parent | 4e57b6817880946a3a78d5d8cad1ace363f7e449 (diff) |
[PATCH] fat: cleanup and optimization of checksum
Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/vfat/namei.c')
-rw-r--r-- | fs/vfat/namei.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/vfat/namei.c b/fs/vfat/namei.c index 1c6f6b57ef1c..467346b123d9 100644 --- a/fs/vfat/namei.c +++ b/fs/vfat/namei.c | |||
@@ -621,8 +621,7 @@ static int vfat_build_slots(struct inode *dir, const unsigned char *name, | |||
621 | } | 621 | } |
622 | 622 | ||
623 | /* build the entry of long file name */ | 623 | /* build the entry of long file name */ |
624 | for (cksum = i = 0; i < 11; i++) | 624 | cksum = fat_checksum(msdos_name); |
625 | cksum = (((cksum&1)<<7)|((cksum&0xfe)>>1)) + msdos_name[i]; | ||
626 | 625 | ||
627 | *nr_slots = usize / 13; | 626 | *nr_slots = usize / 13; |
628 | for (ps = slots, i = *nr_slots; i > 0; i--, ps++) { | 627 | for (ps = slots, i = *nr_slots; i > 0; i--, ps++) { |