The patch titled Subject: fat-add-fitrim-ioctl-for-fat-file-system-fix has been added to the -mm tree. Its filename is fat-add-fitrim-ioctl-for-fat-file-system-fix.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/fat-add-fitrim-ioctl-for-fat-file-system-fix.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/fat-add-fitrim-ioctl-for-fat-file-system-fix.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Wentao Wang <witallwang@xxxxxxxxx> Subject: fat-add-fitrim-ioctl-for-fat-file-system-fix If we keep "trimmed" as an u32, there will be a potential shift wrap. It would be a problem on a larger than 4GB partition with FAT32. Though most tools who call this ioctl would ignore this value, it would be great to fix it. Link: http://lkml.kernel.org/r/87h8l37hub.fsf@xxxxxxxxxxxxxxxxxx Signed-off-by: Wentao Wang <witallwang@xxxxxxxxx> Signed-off-by: OGAWA Hirofumi <hirofumi@xxxxxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- fs/fat/fatent.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff -puN fs/fat/fatent.c~fat-add-fitrim-ioctl-for-fat-file-system-fix fs/fat/fatent.c --- a/fs/fat/fatent.c~fat-add-fitrim-ioctl-for-fat-file-system-fix +++ a/fs/fat/fatent.c @@ -705,8 +705,8 @@ int fat_trim_fs(struct inode *inode, str struct msdos_sb_info *sbi = MSDOS_SB(sb); const struct fatent_operations *ops = sbi->fatent_ops; struct fat_entry fatent; - u64 ent_start, ent_end, minlen; - u32 free = 0, trimmed = 0; + u64 ent_start, ent_end, minlen, trimmed = 0; + u32 free = 0; unsigned long reada_blocks, reada_mask, cur_block = 0; int err = 0; _ Patches currently in -mm which might be from witallwang@xxxxxxxxx are fat-add-fitrim-ioctl-for-fat-file-system.patch fat-add-fitrim-ioctl-for-fat-file-system-fix.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html