[SCSI] st: Move buffer pointer back when data could not be written.
Move buffer pointer back when data could not be written. Bug found by Mike Christie. Signed-off-by: Kai Mäkisara <Kai.Makisara@kolumbus.fi> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
This commit is contained in:
parent
f0773b5ff6
commit
626dcb1ee3
1 changed files with 2 additions and 1 deletions
|
@ -17,7 +17,7 @@
|
||||||
Last modified: 18-JAN-1998 Richard Gooch <rgooch@atnf.csiro.au> Devfs support
|
Last modified: 18-JAN-1998 Richard Gooch <rgooch@atnf.csiro.au> Devfs support
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static const char *verstr = "20080224";
|
static const char *verstr = "20080504";
|
||||||
|
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
|
|
||||||
|
@ -1670,6 +1670,7 @@ st_write(struct file *filp, const char __user *buf, size_t count, loff_t * ppos)
|
||||||
if (undone <= do_count) {
|
if (undone <= do_count) {
|
||||||
/* Only data from this write is not written */
|
/* Only data from this write is not written */
|
||||||
count += undone;
|
count += undone;
|
||||||
|
b_point -= undone;
|
||||||
do_count -= undone;
|
do_count -= undone;
|
||||||
if (STp->block_size)
|
if (STp->block_size)
|
||||||
blks = (transfer - undone) / STp->block_size;
|
blks = (transfer - undone) / STp->block_size;
|
||||||
|
|
Loading…
Add table
Reference in a new issue