From: Nicholas Bellinger Date: Thu, 30 May 2013 04:35:23 +0000 (-0700) Subject: target/file: Fix off-by-one READ_CAPACITY bug for !S_ISBLK export X-Git-Tag: v3.10-rc4~3^2~3 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=21363ca873334391992f2f424856aa864345bb61;p=pandora-kernel.git target/file: Fix off-by-one READ_CAPACITY bug for !S_ISBLK export This patch fixes a bug where FILEIO was incorrectly reporting the number of logical blocks (+ 1) when using non struct block_device export mode. It changes fd_get_blocks() to follow all other backend ->get_blocks() cases, and reduces the calculated dev_size by one dev->dev_attrib.block_size number of bytes, and also fixes initial fd_block_size assignment at fd_configure_device() time introduced in commit 0fd97ccf4. Reported-by: Wenchao Xia Reported-by: Badari Pulavarty Tested-by: Badari Pulavarty Cc: stable@vger.kernel.org Signed-off-by: Nicholas Bellinger --- Reading git-diff-tree failed