sched: add wait_for_completion_io[_timeout]

The only difference between wait_for_completion[_timeout]() and
wait_for_completion_io[_timeout]() is that the latter calls
io_schedule_timeout() instead of schedule_timeout() so that the caller
is accounted as waiting for IO, not just sleeping.

These functions can be used for correct iowait time accounting when the
completion struct is actually used for waiting for IO (e.g. completion
of a bio request in the block layer).

Modified to compile with 3.4.0 on the Nexus 4 (Mako)

Signed-off-by: Vladimir Davydov <vdavydov@parallels.com>
Acked-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>
Signed-off-by: flar2 <asegaert@gmail.com>
Signed-off-by: poondog <markj338@gmail.com>
block: account iowait time when waiting for completion of IO request

Using wait_for_completion() for waiting for a IO request to be executed
results in wrong iowait time accounting. For example, a system having
the only task doing write() and fdatasync() on a block device can be
reported being idle instead of iowaiting as it should because
blkdev_issue_flush() calls wait_for_completion() which in turn calls
schedule() that does not increment the iowait proc counter and thus does
not turn on iowait time accounting.

The patch makes block layer use wait_for_completion_io() instead of
wait_for_completion() where appropriate to account iowait time
correctly.

Signed-off-by: Vladimir Davydov <vdavydov@parallels.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: flar2 <asegaert@gmail.com>
Signed-off-by: poondog <markj338@gmail.com>
msm: kgsl: Fix Z180 memory leak

Decerement entry refcount, which incremented
in kgsl_sharedmem_find_region.

CRs-Fixed: 635747
Change-Id: I621ba8f8e119a9ab8ba5455b28a565e3cae2f7cd
Signed-off-by: Hareesh Gundu <hareeshg@codeaurora.org>
Signed-off-by: poondog <markj338@gmail.com>
PATCH: Linux 3.4.21

Signed-off-by: poondog <markj338@gmail.com>
PATCH: Linux 3.4.22

Signed-off-by: poondog <markj338@gmail.com>
PATCH: Linux 3.4.23

Signed-off-by: poondog <markj338@gmail.com>
PATCH: Linux 3.4.24

Signed-off-by: poondog <markj338@gmail.com>
PATCH: Linux 3.4.25

Signed-off-by: poondog <markj338@gmail.com>
PATCH: Linux 3.4.26

Signed-off-by: poondog <markj338@gmail.com>
PATCH: Linux 3.4.27

Signed-off-by: poondog <markj338@gmail.com>
PATCH: Linux 3.4.28

Signed-off-by: poondog <markj338@gmail.com>
PATCH: Linux 3.4.30

Signed-off-by: poondog <markj338@gmail.com>
PATCH: Linux 3.4.32

Signed-off-by: poondog <markj338@gmail.com>
PATCH: Linux 3.4.33

Signed-off-by: poondog <markj338@gmail.com>
PATCH: Linux 3.4.34

Signed-off-by: poondog <markj338@gmail.com>
PATCH: Linux 3.4.35

Signed-off-by: poondog <markj338@gmail.com>
PATCH: Linux 3.4.36

Signed-off-by: poondog <markj338@gmail.com>
PATCH: Linux 3.4.37

Signed-off-by: poondog <markj338@gmail.com>
PATCH: Linux 3.4.38

Signed-off-by: poondog <markj338@gmail.com>

Conflicts:
	kernel/time/tick-sched.c
PATCH: Linux 3.4.39

Signed-off-by: poondog <markj338@gmail.com>