Skip to content

Commit b8b364d

Browse files
Christoph Hellwigaxboe
authored andcommitted
ubd: move setting the nonrot flag to ubd_add
No reason to delay this until open time. Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Richard Weinberger <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
1 parent 0267e9c commit b8b364d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/um/drivers/ubd_kern.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -799,7 +799,6 @@ static int ubd_open_dev(struct ubd *ubd_dev)
799799
blk_queue_max_discard_sectors(ubd_dev->queue, UBD_MAX_REQUEST);
800800
blk_queue_max_write_zeroes_sectors(ubd_dev->queue, UBD_MAX_REQUEST);
801801
}
802-
blk_queue_flag_set(QUEUE_FLAG_NONROT, ubd_dev->queue);
803802
return 0;
804803
error:
805804
os_close_file(ubd_dev->fd);
@@ -894,6 +893,7 @@ static int ubd_add(int n, char **error_out)
894893
}
895894
ubd_dev->queue = disk->queue;
896895

896+
blk_queue_flag_set(QUEUE_FLAG_NONROT, disk->queue);
897897
blk_queue_write_cache(ubd_dev->queue, true, false);
898898
disk->major = UBD_MAJOR;
899899
disk->first_minor = n << UBD_SHIFT;

0 commit comments

Comments
 (0)