X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fscsi%2Fosst.c;h=fb74a2f64cd51528a2d5d5b020d4f38e1db730a0;hb=9bf4aaab3e101692164d49b7ca357651eb691cb6;hp=b26d95eadbcf565769436f71875a1bcb558daf7c;hpb=db216c3d5e4c040e557a50f8f5d35d5c415e8c1c;p=linux-2.6.git diff --git a/drivers/scsi/osst.c b/drivers/scsi/osst.c index b26d95ead..fb74a2f64 100644 --- a/drivers/scsi/osst.c +++ b/drivers/scsi/osst.c @@ -61,7 +61,7 @@ const char * osst_version = "0.99.1"; #define OSST_DEB_MSG KERN_NOTICE #include "scsi.h" -#include "hosts.h" +#include #include #include @@ -3185,12 +3185,6 @@ static ssize_t osst_write(struct file * filp, const char __user * buf, size_t co goto out; } - if (ppos != &filp->f_pos) { - /* "A request was outside the capabilities of the device." */ - retval = (-ENXIO); - goto out; - } - if (STp->ready != ST_READY) { if (STp->ready == ST_NO_TAPE) retval = (-ENOMEDIUM); @@ -3512,12 +3506,6 @@ static ssize_t osst_read(struct file * filp, char __user * buf, size_t count, lo goto out; } - if (ppos != &filp->f_pos) { - /* "A request was outside the capabilities of the device." */ - retval = (-ENXIO); - goto out; - } - if (STp->ready != ST_READY) { if (STp->ready == ST_NO_TAPE) retval = (-ENOMEDIUM); @@ -4254,6 +4242,7 @@ static int os_scsi_tape_open(struct inode * inode, struct file * filp) int dev = TAPE_NR(inode); int mode = TAPE_MODE(inode); + nonseekable_open(inode, filp); write_lock(&os_scsi_tapes_lock); if (dev >= osst_max_dev || os_scsi_tapes == NULL || (STp = os_scsi_tapes[dev]) == NULL || !STp->device) {