diff options
author | Bryan O'Sullivan <bos@pathscale.com> | 2006-04-25 01:22:57 +0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2006-05-01 23:14:11 +0400 |
commit | 755e4ca4a9885b79a14169ab5b615920eb38a32a (patch) | |
tree | df85b5a5f16f25db7f6d106c69f4ddb10b9f1880 /drivers/infiniband/hw/ipath/ipath_diag.c | |
parent | 254abfd33a214617deb916585b306faee834c97f (diff) | |
download | linux-755e4ca4a9885b79a14169ab5b615920eb38a32a.tar.xz |
IB/ipath: fix race with exposing reset file
We were accidentally exposing the "reset" sysfs file more than once
per device.
Signed-off-by: Bryan O'Sullivan <bos@pathscale.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/ipath/ipath_diag.c')
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_diag.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_diag.c b/drivers/infiniband/hw/ipath/ipath_diag.c index 7d3fb6996b41..28ddceb260e8 100644 --- a/drivers/infiniband/hw/ipath/ipath_diag.c +++ b/drivers/infiniband/hw/ipath/ipath_diag.c @@ -277,13 +277,14 @@ static int ipath_diag_open(struct inode *in, struct file *fp) bail: spin_unlock_irqrestore(&ipath_devs_lock, flags); - mutex_unlock(&ipath_mutex); /* Only expose a way to reset the device if we make it into diag mode. */ if (ret == 0) ipath_expose_reset(&dd->pcidev->dev); + mutex_unlock(&ipath_mutex); + return ret; } |