VServer 1.9.2 (patch-2.6.8.1-vs1.9.2.diff)
[linux-2.6.git] / drivers / scsi / osst.c
index b26d95e..fb74a2f 100644 (file)
@@ -61,7 +61,7 @@ const char * osst_version = "0.99.1";
 #define OSST_DEB_MSG  KERN_NOTICE
 
 #include "scsi.h"
-#include "hosts.h"
+#include <scsi/scsi_host.h>
 #include <scsi/scsi_driver.h>
 #include <scsi/scsi_ioctl.h>
 
@@ -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) {