nbd: Change 'disconnect' to be boolean

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Acked-by: Pavel Machek  <pavel@ucw.cz>
Signed-off-by: Jens Axboe <axboe@fb.com>
This commit is contained in:
Markus Pargmann 2015-08-17 08:20:07 +02:00 committed by Jens Axboe
parent 30d53d9c11
commit 696697cb50
1 changed files with 4 additions and 4 deletions

View File

@ -57,7 +57,7 @@ struct nbd_device {
int blksize; int blksize;
loff_t bytesize; loff_t bytesize;
int xmit_timeout; int xmit_timeout;
int disconnect; /* a disconnect has been requested by user */ bool disconnect; /* a disconnect has been requested by user */
struct timer_list timeout_timer; struct timer_list timeout_timer;
struct task_struct *task_recv; struct task_struct *task_recv;
@ -145,7 +145,7 @@ static void nbd_xmit_timeout(unsigned long arg)
if (list_empty(&nbd->queue_head)) if (list_empty(&nbd->queue_head))
return; return;
nbd->disconnect = 1; nbd->disconnect = true;
task = READ_ONCE(nbd->task_recv); task = READ_ONCE(nbd->task_recv);
if (task) if (task)
@ -646,7 +646,7 @@ static int __nbd_ioctl(struct block_device *bdev, struct nbd_device *nbd,
if (!nbd->sock) if (!nbd->sock)
return -EINVAL; return -EINVAL;
nbd->disconnect = 1; nbd->disconnect = true;
nbd_send_req(nbd, &sreq); nbd_send_req(nbd, &sreq);
return 0; return 0;
@ -674,7 +674,7 @@ static int __nbd_ioctl(struct block_device *bdev, struct nbd_device *nbd,
nbd->sock = sock; nbd->sock = sock;
if (max_part > 0) if (max_part > 0)
bdev->bd_invalidated = 1; bdev->bd_invalidated = 1;
nbd->disconnect = 0; /* we're connected now */ nbd->disconnect = false; /* we're connected now */
return 0; return 0;
} }
return -EINVAL; return -EINVAL;