Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 68926
b: refs/heads/master
c: 4390e60
h: refs/heads/master
v: v3
  • Loading branch information
Matthias Kaehlcke authored and James Bottomley committed Oct 12, 2007
1 parent 363b81b commit a6e47d7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 488a5c8a9a3b67ae117784cd0d73bef53a73d57d
refs/heads/master: 4390e60163979621f59e3a25a260289986eacb85
16 changes: 8 additions & 8 deletions trunk/drivers/scsi/osst.c
Original file line number Diff line number Diff line change
Expand Up @@ -3298,7 +3298,7 @@ static ssize_t osst_write(struct file * filp, const char __user * buf, size_t co
char * name = tape_name(STp);


if (down_interruptible(&STp->lock))
if (mutex_lock_interruptible(&STp->lock))
return (-ERESTARTSYS);

/*
Expand Down Expand Up @@ -3600,7 +3600,7 @@ if (SRpnt) printk(KERN_ERR "%s:A: Not supposed to have SRpnt at line %d\n", name
out:
if (SRpnt != NULL) osst_release_request(SRpnt);

up(&STp->lock);
mutex_unlock(&STp->lock);

return retval;
}
Expand All @@ -3619,7 +3619,7 @@ static ssize_t osst_read(struct file * filp, char __user * buf, size_t count, lo
char * name = tape_name(STp);


if (down_interruptible(&STp->lock))
if (mutex_lock_interruptible(&STp->lock))
return (-ERESTARTSYS);

/*
Expand Down Expand Up @@ -3785,7 +3785,7 @@ static ssize_t osst_read(struct file * filp, char __user * buf, size_t count, lo
out:
if (SRpnt != NULL) osst_release_request(SRpnt);

up(&STp->lock);
mutex_unlock(&STp->lock);

return retval;
}
Expand Down Expand Up @@ -4852,7 +4852,7 @@ static int osst_ioctl(struct inode * inode,struct file * file,
char * name = tape_name(STp);
void __user * p = (void __user *)arg;

if (down_interruptible(&STp->lock))
if (mutex_lock_interruptible(&STp->lock))
return -ERESTARTSYS;

#if DEBUG
Expand Down Expand Up @@ -5163,14 +5163,14 @@ static int osst_ioctl(struct inode * inode,struct file * file,
}
if (SRpnt) osst_release_request(SRpnt);

up(&STp->lock);
mutex_unlock(&STp->lock);

return scsi_ioctl(STp->device, cmd_in, p);

out:
if (SRpnt) osst_release_request(SRpnt);

up(&STp->lock);
mutex_unlock(&STp->lock);

return retval;
}
Expand Down Expand Up @@ -5865,7 +5865,7 @@ static int osst_probe(struct device *dev)
tpnt->modes[2].defined = 1;
tpnt->density_changed = tpnt->compression_changed = tpnt->blksize_changed = 0;

init_MUTEX(&tpnt->lock);
mutex_init(&tpnt->lock);
osst_nr_dev++;
write_unlock(&os_scsi_tapes_lock);

Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/scsi/osst.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

#include <asm/byteorder.h>
#include <linux/completion.h>
#include <linux/mutex.h>

/* FIXME - rename and use the following two types or delete them!
* and the types really should go to st.h anyway...
Expand Down Expand Up @@ -532,7 +533,7 @@ struct osst_tape {
struct scsi_driver *driver;
unsigned capacity;
struct scsi_device *device;
struct semaphore lock; /* for serialization */
struct mutex lock; /* for serialization */
struct completion wait; /* for SCSI commands */
struct osst_buffer * buffer;

Expand Down

0 comments on commit a6e47d7

Please sign in to comment.