git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[SCSI] qla2xxx: Change GFP_ATOMIC to GFP_KERNEL for non-atomic allocations.
[safe/jmp/linux-2.6]
/
drivers
/
scsi
/
st.c
diff --git
a/drivers/scsi/st.c
b/drivers/scsi/st.c
index
41b1f81
..
c2bb53e
100644
(file)
--- a/
drivers/scsi/st.c
+++ b/
drivers/scsi/st.c
@@
-631,7
+631,7
@@
static int cross_eof(struct scsi_tape * STp, int forward)
/* Flush the write buffer (never need to write if variable blocksize). */
static int st_flush_write_buffer(struct scsi_tape * STp)
{
/* Flush the write buffer (never need to write if variable blocksize). */
static int st_flush_write_buffer(struct scsi_tape * STp)
{
- int
offset,
transfer, blks;
+ int transfer, blks;
int result;
unsigned char cmd[MAX_COMMAND_SIZE];
struct st_request *SRpnt;
int result;
unsigned char cmd[MAX_COMMAND_SIZE];
struct st_request *SRpnt;
@@
-644,14
+644,10
@@
static int st_flush_write_buffer(struct scsi_tape * STp)
result = 0;
if (STp->dirty == 1) {
result = 0;
if (STp->dirty == 1) {
- offset = (STp->buffer)->buffer_bytes;
- transfer = ((offset + STp->block_size - 1) /
- STp->block_size) * STp->block_size;
+ transfer = STp->buffer->buffer_bytes;
DEBC(printk(ST_DEB_MSG "%s: Flushing %d bytes.\n",
tape_name(STp), transfer));
DEBC(printk(ST_DEB_MSG "%s: Flushing %d bytes.\n",
tape_name(STp), transfer));
- memset((STp->buffer)->b_data + offset, 0, transfer - offset);
-
memset(cmd, 0, MAX_COMMAND_SIZE);
cmd[0] = WRITE_6;
cmd[1] = 1;
memset(cmd, 0, MAX_COMMAND_SIZE);
cmd[0] = WRITE_6;
cmd[1] = 1;