]> err.no Git - linux-2.6/commitdiff
[SCSI] st: Move buffer pointer back when data could not be written.
authorKai Makisara <Kai.Makisara@kolumbus.fi>
Fri, 11 Jul 2008 12:05:25 +0000 (15:05 +0300)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Sat, 26 Jul 2008 19:14:47 +0000 (15:14 -0400)
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>
drivers/scsi/st.c

index 4684cc716aa4033575b7738ded7ca3196cadd850..41b1f81b1651690986ab55dcc3f48b3f39c96367 100644 (file)
@@ -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>
 
@@ -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;