diff options
| -rw-r--r-- | drivers/block/nbd.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c index 9e553a753410..ef57e7d83aed 100644 --- a/drivers/block/nbd.c +++ b/drivers/block/nbd.c | |||
| @@ -110,14 +110,11 @@ static void nbd_end_request(struct nbd_device *nbd, struct request *req) | |||
| 110 | spin_unlock_irqrestore(q->queue_lock, flags); | 110 | spin_unlock_irqrestore(q->queue_lock, flags); |
| 111 | } | 111 | } |
| 112 | 112 | ||
| 113 | /* | ||
| 114 | * Forcibly shutdown the socket causing all listeners to error | ||
| 115 | */ | ||
| 113 | static void sock_shutdown(struct nbd_device *nbd, int lock) | 116 | static void sock_shutdown(struct nbd_device *nbd, int lock) |
| 114 | { | 117 | { |
| 115 | /* Forcibly shutdown the socket causing all listeners | ||
| 116 | * to error | ||
| 117 | * | ||
| 118 | * FIXME: This code is duplicated from sys_shutdown, but | ||
| 119 | * there should be a more generic interface rather than | ||
| 120 | * calling socket ops directly here */ | ||
| 121 | if (lock) | 118 | if (lock) |
| 122 | mutex_lock(&nbd->tx_lock); | 119 | mutex_lock(&nbd->tx_lock); |
| 123 | if (nbd->sock) { | 120 | if (nbd->sock) { |
