diff options
author | Matthew Wilcox <matthew.r.wilcox@intel.com> | 2012-01-10 22:35:08 +0100 |
---|---|---|
committer | Matthew Wilcox <matthew.r.wilcox@intel.com> | 2012-01-10 22:29:23 +0100 |
commit | 4eeb9215a0d5c9494ca8b20158cc8ee82618840c (patch) | |
tree | e78031c97d64d7545454f729f14e4885fa5f5f5c /drivers/block | |
parent | NVMe: Simplify nvme_unmap_user_pages (diff) | |
download | linux-4eeb9215a0d5c9494ca8b20158cc8ee82618840c.tar.xz linux-4eeb9215a0d5c9494ca8b20158cc8ee82618840c.zip |
NVMe: Set queue flags correctly
QUEUE_FLAG_* are flags (other than QUEUE_FLAG_DEFAULT), so they cannot
be ORed together. Set the queue flags using queue_flag_set_unlocked().
Reported-by: Donald Wood <donald.e.wood@intel.com>
Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/nvme.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/block/nvme.c b/drivers/block/nvme.c index 3cf82c27a544..b583603fae5b 100644 --- a/drivers/block/nvme.c +++ b/drivers/block/nvme.c @@ -1315,8 +1315,10 @@ static struct nvme_ns *nvme_alloc_ns(struct nvme_dev *dev, int nsid, ns->queue = blk_alloc_queue(GFP_KERNEL); if (!ns->queue) goto out_free_ns; - ns->queue->queue_flags = QUEUE_FLAG_DEFAULT | QUEUE_FLAG_NOMERGES | - QUEUE_FLAG_NONROT | QUEUE_FLAG_DISCARD; + ns->queue->queue_flags = QUEUE_FLAG_DEFAULT; + queue_flag_set_unlocked(QUEUE_FLAG_NOMERGES, ns->queue); + queue_flag_set_unlocked(QUEUE_FLAG_NONROT, ns->queue); +/* queue_flag_set_unlocked(QUEUE_FLAG_DISCARD, ns->queue); */ blk_queue_make_request(ns->queue, nvme_make_request); ns->dev = dev; ns->queue->queuedata = ns; |