aacraid: Created new mutex for ioctl path
aac_mutex was used to create protect the ioctl path for only the compat path, it would be make more sense to place mutex in aac_do_ioctl, which is the main ioctl function call that handles all ioctl commands. Created new mutex ioctl_mutex in struct aac_dev to protect switch case in aac_do_ioctl and removed aac_mutex from aac_cfg_ioctl and aac_compat_do_ioctl Signed-off-by: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@pmcs.com> Reviewed-by: Tomas Henzl <thenzl@redhat.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
committed by
Martin K. Petersen
parent
6b93b7dd85
commit
222a9fb376
@@ -855,13 +855,15 @@ int aac_do_ioctl(struct aac_dev * dev, int cmd, void __user *arg)
|
||||
{
|
||||
int status;
|
||||
|
||||
mutex_lock(&dev->ioctl_mutex);
|
||||
|
||||
/*
|
||||
* HBA gets first crack
|
||||
*/
|
||||
|
||||
status = aac_dev_ioctl(dev, cmd, arg);
|
||||
if (status != -ENOTTY)
|
||||
return status;
|
||||
goto cleanup;
|
||||
|
||||
switch (cmd) {
|
||||
case FSACTL_MINIPORT_REV_CHECK:
|
||||
@@ -890,6 +892,10 @@ int aac_do_ioctl(struct aac_dev * dev, int cmd, void __user *arg)
|
||||
status = -ENOTTY;
|
||||
break;
|
||||
}
|
||||
|
||||
cleanup:
|
||||
mutex_unlock(&dev->ioctl_mutex);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user