[PATCH] jffs2: refactor csize in jffs2_do_read_inode_internal()

Artem Bityutskiy dedekind1 at gmail.com
Sat Apr 21 10:12:58 EDT 2012


On Mon, 2012-04-09 at 18:42 -0400, Xi Wang wrote:
> Replace the verbose `je32_to_cpu(latest_node->csize)' with a shorter
> variable `csize'.
> 
> Also check for a bogus `csize' value 0xffffffff, which would turn the
> subsequent kmalloc(cisze + 1, ...) into kmalloc(0, ...).
> 
> Signed-off-by: Xi Wang <xi.wang at gmail.com>

Looks good. I wonder, does it fix a real-life issue or you spotted this
place while reviewing/fixing warnings/other janitor type of work?

-- 
Best Regards,
Artem Bityutskiy




More information about the linux-mtd mailing list