Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 328885
b: refs/heads/master
c: b656688
h: refs/heads/master
i:
  328883: bff32bf
v: v3
  • Loading branch information
Alexey Khoroshilov authored and James Bottomley committed Sep 24, 2012
1 parent d84f59b commit ca02b8a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 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: f2b0599de5450e11bc41be2432a161f86d816ae3
refs/heads/master: b656688a90175d4c424a2f02264863ede7e82d7b
8 changes: 5 additions & 3 deletions trunk/drivers/scsi/mpt2sas/mpt2sas_ctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -2181,10 +2181,12 @@ _ctl_ioctl_main(struct file *file, unsigned int cmd, void __user *arg,
return -EAGAIN;

state = (file->f_flags & O_NONBLOCK) ? NON_BLOCKING : BLOCKING;
if (state == NON_BLOCKING && !mutex_trylock(&ioc->ctl_cmds.mutex))
return -EAGAIN;
else if (mutex_lock_interruptible(&ioc->ctl_cmds.mutex))
if (state == NON_BLOCKING) {
if (!mutex_trylock(&ioc->ctl_cmds.mutex))
return -EAGAIN;
} else if (mutex_lock_interruptible(&ioc->ctl_cmds.mutex)) {
return -ERESTARTSYS;
}

switch (cmd) {
case MPT2IOCINFO:
Expand Down

0 comments on commit ca02b8a

Please sign in to comment.