]> git.baikalelectronics.ru Git - kernel.git/commit
target: Don't return an error status for 0-length READ and WRITE
authorRoland Dreier <roland@purestorage.com>
Tue, 22 Nov 2011 21:51:32 +0000 (13:51 -0800)
committerNicholas Bellinger <nab@linux-iscsi.org>
Tue, 6 Dec 2011 06:00:55 +0000 (06:00 +0000)
commit6f203d43e3d3bcb1a107f8081543d114a30588bd
treedfad1b29759c54f4ce5141f6d15b8f3d18d00b6e
parent472e47358ff66f050b212d998d2786f865b0399c
target: Don't return an error status for 0-length READ and WRITE

IO commands with a TRANSFER LENGTH of 0 are not an error; for example,
for READ (10) and WRITE (10), SBC-3 says:

    A TRANSFER LENGTH field set to zero specifies that no logical blocks
    shall be read. This condition shall not be considered an error.

In case we have nothing to do, just complete the command with good status.

Signed-off-by: Roland Dreier <roland@purestorage.com>
Cc: stable@kernel.org
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/target_core_transport.c