]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
nbd: remove bogus BUG_ON in NBD_CLEAR_QUE
authorMichal Belczyk <belczyk@bsd.krakow.pl>
Thu, 27 Jun 2013 23:54:11 +0000 (09:54 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 28 Jun 2013 06:39:06 +0000 (16:39 +1000)
The NBD_CLEAR_QUE ioctl has been deprecated for quite some time (its job
is now done by two other ioctls).  We should stop trying to make bogus
assertions in it.  Also, user-level code should remove calls to
NBD_CLEAR_QUE, ASAP.

Signed-off-by: Michal Belczyk <belczyk@bsd.krakow.pl>
Signed-off-by: Paul Clements <paul.clements@steeleye.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/block/nbd.c

index 46b35f7acfdeb098eb022a2d9cb2ca1134321ddf..7ed1308c42d3226a11c1935b99a00a8e409c771e 100644 (file)
@@ -751,7 +751,6 @@ static int __nbd_ioctl(struct block_device *bdev, struct nbd_device *nbd,
                 * This is for compatibility only.  The queue is always cleared
                 * by NBD_DO_IT or NBD_CLEAR_SOCK.
                 */
-               BUG_ON(!nbd->sock && !list_empty(&nbd->queue_head));
                return 0;
 
        case NBD_PRINT_DEBUG: