aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-01-15 15:24:45 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2012-01-15 15:24:45 -0500
commitb3c9dd182ed3bdcdaf0e42625a35924b0497afdc (patch)
treead48ad4d923fee147c736318d0fad35b3755f4f5 /fs
parent83c2f912b43c3a7babbb6cb7ae2a5276c1ed2a3e (diff)
parent5d381efb3d1f1ef10535a31ca0dd9b22fe1e1922 (diff)
Merge branch 'for-3.3/core' of git://git.kernel.dk/linux-block
* 'for-3.3/core' of git://git.kernel.dk/linux-block: (37 commits) Revert "block: recursive merge requests" block: Stop using macro stubs for the bio data integrity calls blockdev: convert some macros to static inlines fs: remove unneeded plug in mpage_readpages() block: Add BLKROTATIONAL ioctl block: Introduce blk_set_stacking_limits function block: remove WARN_ON_ONCE() in exit_io_context() block: an exiting task should be allowed to create io_context block: ioc_cgroup_changed() needs to be exported block: recursive merge requests block, cfq: fix empty queue crash caused by request merge block, cfq: move icq creation and rq->elv.icq association to block core block, cfq: restructure io_cq creation path for io_context interface cleanup block, cfq: move io_cq exit/release to blk-ioc.c block, cfq: move icq cache management to block core block, cfq: move io_cq lookup to blk-ioc.c block, cfq: move cfqd->icq_list to request_queue and add request->elv.icq block, cfq: reorganize cfq_io_context into generic and cfq specific parts block: remove elevator_queue->ops block: reorder elevator switch sequence ... Fix up conflicts in: - block/blk-cgroup.c Switch from can_attach_task to can_attach - block/cfq-iosched.c conflict with now removed cic index changes (we now use q->id instead)
Diffstat (limited to 'fs')
-rw-r--r--fs/ioprio.c24
-rw-r--r--fs/mpage.c4
2 files changed, 4 insertions, 24 deletions
diff --git a/fs/ioprio.c b/fs/ioprio.c
index f79dab83e17b..f84b380d65e5 100644
--- a/fs/ioprio.c
+++ b/fs/ioprio.c
@@ -48,28 +48,12 @@ int set_task_ioprio(struct task_struct *task, int ioprio)
48 if (err) 48 if (err)
49 return err; 49 return err;
50 50
51 task_lock(task); 51 ioc = get_task_io_context(task, GFP_ATOMIC, NUMA_NO_NODE);
52 do { 52 if (ioc) {
53 ioc = task->io_context; 53 ioc_ioprio_changed(ioc, ioprio);
54 /* see wmb() in current_io_context() */ 54 put_io_context(ioc, NULL);
55 smp_read_barrier_depends();
56 if (ioc)
57 break;
58
59 ioc = alloc_io_context(GFP_ATOMIC, -1);
60 if (!ioc) {
61 err = -ENOMEM;
62 break;
63 }
64 task->io_context = ioc;
65 } while (1);
66
67 if (!err) {
68 ioc->ioprio = ioprio;
69 ioc->ioprio_changed = 1;
70 } 55 }
71 56
72 task_unlock(task);
73 return err; 57 return err;
74} 58}
75EXPORT_SYMBOL_GPL(set_task_ioprio); 59EXPORT_SYMBOL_GPL(set_task_ioprio);
diff --git a/fs/mpage.c b/fs/mpage.c
index fdfae9fa98cd..643e9f55ef29 100644
--- a/fs/mpage.c
+++ b/fs/mpage.c
@@ -371,9 +371,6 @@ mpage_readpages(struct address_space *mapping, struct list_head *pages,
371 sector_t last_block_in_bio = 0; 371 sector_t last_block_in_bio = 0;
372 struct buffer_head map_bh; 372 struct buffer_head map_bh;
373 unsigned long first_logical_block = 0; 373 unsigned long first_logical_block = 0;
374 struct blk_plug plug;
375
376 blk_start_plug(&plug);
377 374
378 map_bh.b_state = 0; 375 map_bh.b_state = 0;
379 map_bh.b_size = 0; 376 map_bh.b_size = 0;
@@ -395,7 +392,6 @@ mpage_readpages(struct address_space *mapping, struct list_head *pages,
395 BUG_ON(!list_empty(pages)); 392 BUG_ON(!list_empty(pages));
396 if (bio) 393 if (bio)
397 mpage_bio_submit(READ, bio); 394 mpage_bio_submit(READ, bio);
398 blk_finish_plug(&plug);
399 return 0; 395 return 0;
400} 396}
401EXPORT_SYMBOL(mpage_readpages); 397EXPORT_SYMBOL(mpage_readpages);