patch-2.4.27 linux-2.4.27/drivers/scsi/st.c
Next file: linux-2.4.27/drivers/sound/724hwmcode.h
Previous file: linux-2.4.27/drivers/scsi/scsi_scan.c
Back to the patch index
Back to the overall index
- Lines: 76
- Date:
2004-08-07 16:26:05.537383060 -0700
- Orig file:
linux-2.4.26/drivers/scsi/st.c
- Orig date:
2004-02-18 05:36:31.000000000 -0800
diff -urN linux-2.4.26/drivers/scsi/st.c linux-2.4.27/drivers/scsi/st.c
@@ -1202,6 +1202,7 @@
ST_mode *STm;
ST_partstat *STps;
int dev = TAPE_NR(inode->i_rdev);
+ loff_t pos = *ppos;
read_lock(&st_dev_arr_lock);
STp = scsi_tapes[dev];
@@ -1433,7 +1434,7 @@
residual *= STp->block_size;
if (residual <= do_count) {
/* Within the data in this write() */
- filp->f_pos += do_count - residual;
+ pos += do_count - residual;
count -= do_count - residual;
if (STps->drv_block >= 0) {
if (STp->block_size == 0 &&
@@ -1489,7 +1490,7 @@
retval = total - count;
goto out;
}
- filp->f_pos += do_count;
+ pos += do_count;
b_point += do_count;
count -= do_count;
if (STps->drv_block >= 0) {
@@ -1508,7 +1509,7 @@
retval = i;
goto out;
}
- filp->f_pos += count;
+ pos += count;
count = 0;
}
@@ -1543,6 +1544,7 @@
retval = total - count;
out:
+ *ppos = pos;
if (SRpnt != NULL)
scsi_release_request(SRpnt);
up(&STp->lock);
@@ -1743,6 +1745,7 @@
ST_mode *STm;
ST_partstat *STps;
int dev = TAPE_NR(inode->i_rdev);
+ loff_t pos = *ppos;
read_lock(&st_dev_arr_lock);
STp = scsi_tapes[dev];
@@ -1887,7 +1890,7 @@
retval = i;
goto out;
}
- filp->f_pos += transfer;
+ pos += transfer;
buf += transfer;
total += transfer;
}
@@ -1917,6 +1920,7 @@
retval = total;
out:
+ *ppos = pos;
if (SRpnt != NULL) {
scsi_release_request(SRpnt);
SRpnt = NULL;
@@ -3774,6 +3778,7 @@
read: st_read,
write: st_write,
ioctl: st_ioctl,
+ llseek: no_llseek,
open: st_open,
flush: st_flush,
release: st_release,
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)