]> rtime.felk.cvut.cz Git - lisovros/linux_canprio.git/commit
romfs_readpage: don't report errors for pages beyond i_size
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 30 Jul 2008 21:26:25 +0000 (14:26 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 6 Aug 2008 16:03:09 +0000 (09:03 -0700)
commitedc6e0f91ad1e46538a4f1d61ab54d9841f7ff95
treed8481015503844e12acdcaed7fb5c49db69fee7a
parentbfbd4e660b75ee377ec1310d511b9e2a714e7b7c
romfs_readpage: don't report errors for pages beyond i_size

commit 0056e65f9e28d83ee1a3fb4f7d0041e838f03c34 upstream

We zero-fill them like we are supposed to, and that's all fine.  It's
only an error if the 'romfs_copyfrom()' routine isn't able to fill the
data that is supposed to be there.

Most of the patch is really just re-organizing the code a bit, and using
separate variables for the error value and for how much of the page we
actually filled from the filesystem.

Reported-and-tested-by: Chris Fester <cfester@wms.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Matt Waddel <matt.waddel@freescale.com>
Cc: Greg Ungerer <gerg@snapgear.com>
Signed-of-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/romfs/inode.c