Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

nbd: remove bogus BUG_ON in NBD_CLEAR_QUE

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>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Michal Belczyk and committed by
Linus Torvalds
9532f149 8f75af44

-1
-1
drivers/block/nbd.c
··· 751 751 * This is for compatibility only. The queue is always cleared 752 752 * by NBD_DO_IT or NBD_CLEAR_SOCK. 753 753 */ 754 - BUG_ON(!nbd->sock && !list_empty(&nbd->queue_head)); 755 754 return 0; 756 755 757 756 case NBD_PRINT_DEBUG: