if (ret == 0) {
DPRINT("%s: error: (requested pages == 0) (wanted %d)\n",
__FUNCTION__, requested_pages);
+ mutex_unlock(&pipe->lock);
return ret;
}
if (ret < 0) {
DPRINT("%s: (requested pages < 0) %d \n",
__FUNCTION__, requested_pages);
+ mutex_unlock(&pipe->lock);
return ret;
}
}
/* Try to re-acquire the lock */
- if (mutex_lock_interruptible(&pipe->lock)) {
- ret = -ERESTARTSYS;
- break;
- }
+ if (mutex_lock_interruptible(&pipe->lock))
+ return -ERESTARTSYS;
}
mutex_unlock(&pipe->lock);