[PATCH 1/2] SCSI tape: fix buffer position in partial write

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Move buffer pointer back when data could not be written. Bug found by Mike Christie.

Signed-off-by: Kai Makisara <kai.makisara@xxxxxxxxxxx>
---
The patch is against 2.6.26-rc1.

 drivers/scsi/st.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Index: linux-2.6.26-rc1-q/drivers/scsi/st.c
===================================================================
--- linux-2.6.26-rc1-q.orig/drivers/scsi/st.c
+++ linux-2.6.26-rc1-q/drivers/scsi/st.c
@@ -17,7 +17,7 @@
    Last modified: 18-JAN-1998 Richard Gooch <rgooch@xxxxxxxxxxxxx> Devfs support
  */
 
-static const char *verstr = "20080224";
+static const char *verstr = "20080504";
 
 #include <linux/module.h>
 
@@ -1663,6 +1663,7 @@ st_write(struct file *filp, const char _
 				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;
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux