Skip to content

Commit

Permalink
[SCSI] st: Move buffer pointer back when data could not be written.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Kai Makisara authored and James Bottomley committed Jul 26, 2008
1 parent f0773b5 commit 626dcb1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/scsi/st.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
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>

Expand Down Expand Up @@ -1670,6 +1670,7 @@ st_write(struct file *filp, const char __user *buf, size_t count, loff_t * ppos)
if (undone <= do_count) {
/* Only data from this write is not written */
count += undone;
b_point -= undone;
do_count -= undone;
if (STp->block_size)
blks = (transfer - undone) / STp->block_size;
Expand Down

0 comments on commit 626dcb1

Please sign in to comment.