Re: [PATCH] [BUGFIX] drivers/base: fix show_mem_removable sectioncount

From: Russ Anderson
Date: Fri Aug 23 2013 - 12:08:09 EST


On Fri, Aug 23, 2013 at 04:23:10PM +0900, Yasuaki Ishimatsu wrote:
>
> I don't think it works well.
> mem->section_count means how many present section is in the memory_block.
> If 0, 1, 3 and 4 sections are present in the memory_block, mem->section_count
> is 4. In this case, is_mem_sectionremovable is called for section 2. But the
> section is not present. So if the memory_block has hole, same problem will occur.
>
> How about keep sections_per_block loop and add following check:
>
> if (!present_section_nr(mem->start_section_nr + i))
> continue;

Yes, I will make that change and resubmit the patch.
Thanks.

> Thanks,
> Yasuaki Ishimatsu

--
Russ Anderson, OS RAS/Partitioning Project Lead
SGI - Silicon Graphics Inc rja@xxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/