diff options
author | Kai Makisara <Kai.Makisara@kolumbus.fi> | 2008-07-11 08:05:25 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-07-26 15:14:47 -0400 |
commit | 626dcb1ee39aa1010c27df31970ff0ecfb287208 (patch) | |
tree | 27f12b173e4d0f4bb9138cdb5a56552bb3333d4f /drivers/scsi/st.c | |
parent | f0773b5ff6d6978c01525f0c34db42d5cedb9394 (diff) |
[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>
Diffstat (limited to 'drivers/scsi/st.c')
-rw-r--r-- | drivers/scsi/st.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c index 4684cc716aa4..41b1f81b1651 100644 --- a/drivers/scsi/st.c +++ b/drivers/scsi/st.c | |||
@@ -17,7 +17,7 @@ | |||
17 | Last modified: 18-JAN-1998 Richard Gooch <rgooch@atnf.csiro.au> Devfs support | 17 | Last modified: 18-JAN-1998 Richard Gooch <rgooch@atnf.csiro.au> Devfs support |
18 | */ | 18 | */ |
19 | 19 | ||
20 | static const char *verstr = "20080224"; | 20 | static const char *verstr = "20080504"; |
21 | 21 | ||
22 | #include <linux/module.h> | 22 | #include <linux/module.h> |
23 | 23 | ||
@@ -1670,6 +1670,7 @@ st_write(struct file *filp, const char __user *buf, size_t count, loff_t * ppos) | |||
1670 | if (undone <= do_count) { | 1670 | if (undone <= do_count) { |
1671 | /* Only data from this write is not written */ | 1671 | /* Only data from this write is not written */ |
1672 | count += undone; | 1672 | count += undone; |
1673 | b_point -= undone; | ||
1673 | do_count -= undone; | 1674 | do_count -= undone; |
1674 | if (STp->block_size) | 1675 | if (STp->block_size) |
1675 | blks = (transfer - undone) / STp->block_size; | 1676 | blks = (transfer - undone) / STp->block_size; |