Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 118513
b: refs/heads/master
c: 638570b
h: refs/heads/master
i:
  118511: ecbc8dc
v: v3
  • Loading branch information
Stefan Richter committed Oct 31, 2008
1 parent a222076 commit eda5b7c
Show file tree
Hide file tree
Showing 2 changed files with 7 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: 233976e539a93de1320fc7625b24076b1f9e2c9c
refs/heads/master: 638570b54346f140bc09b986d93e76025d35180f
9 changes: 6 additions & 3 deletions trunk/drivers/ieee1394/raw1394.c
Original file line number Diff line number Diff line change
Expand Up @@ -2268,7 +2268,8 @@ static ssize_t raw1394_write(struct file *file, const char __user * buffer,
return -EFAULT;
}

mutex_lock(&fi->state_mutex);
if (!mutex_trylock(&fi->state_mutex))
return -EAGAIN;

switch (fi->state) {
case opened:
Expand Down Expand Up @@ -2548,7 +2549,8 @@ static int raw1394_mmap(struct file *file, struct vm_area_struct *vma)
struct file_info *fi = file->private_data;
int ret;

mutex_lock(&fi->state_mutex);
if (!mutex_trylock(&fi->state_mutex))
return -EAGAIN;

if (fi->iso_state == RAW1394_ISO_INACTIVE)
ret = -EINVAL;
Expand Down Expand Up @@ -2669,7 +2671,8 @@ static long raw1394_ioctl(struct file *file, unsigned int cmd,
break;
}

mutex_lock(&fi->state_mutex);
if (!mutex_trylock(&fi->state_mutex))
return -EAGAIN;

switch (fi->iso_state) {
case RAW1394_ISO_INACTIVE:
Expand Down

0 comments on commit eda5b7c

Please sign in to comment.