It not needed, because I already added locking for all fops
methods.
Signed-off-by: Maxim Levitsky <maximlevisky@gmail.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
if (!dev)
return -ERESTARTSYS; /* FIXME: busy loop! -arnd*/
- lock_kernel();
mutex_lock(&dev->lock);
if (dev->open++)
unlock:
mutex_unlock(&dev->lock);
blktrans_dev_put(dev);
- unlock_kernel();
return ret;
}
if (!dev)
return ret;
- lock_kernel();
mutex_lock(&dev->lock);
if (--dev->open)
unlock:
mutex_unlock(&dev->lock);
blktrans_dev_put(dev);
- unlock_kernel();
return ret;
}
if (!dev)
return ret;
- lock_kernel();
mutex_lock(&dev->lock);
if (!dev->mtd)
}
unlock:
mutex_unlock(&dev->lock);
- unlock_kernel();
blktrans_dev_put(dev);
return ret;
}