mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
Merge branch 'for-linus' of git://git.kernel.dk/linux-block
Pull block layer fixes from Jens Axboe:
"A small collection of fixes that has been gathered over the last few
weeks. This contains:
- A one-liner fix for NVMe, fixing a missing list_head init that
could makes us oops on hitting recovery at load time.
- Two small blk-mq fixes:
- Fixup a bad goto jump on error handling.
- Fix for oopsing if running out of reserved tags.
- A memory leak fix for NBD.
- Two small writeback fixes from Tejun, fixing a missing init to
INITIAL_JIFFIES, and a possible underflow introduced recently.
- A core merge fixup in sg gap detection, where rq->biotail was
indexed with the count of rq->bio"
* 'for-linus' of git://git.kernel.dk/linux-block:
writeback: fix possible underflow in write bandwidth calculation
NVMe: Initialize device list head before starting
Fix bug in blk_rq_merge_ok
blkmq: Fix NULL pointer deref when all reserved tags in
blk-mq: fix use of incorrect goto label in blk_mq_init_queue error path
nbd: fix possible memory leak
writeback: add missing INITIAL_JIFFIES init in global_update_bandwidth()
This commit is contained in:
commit
b8517e9830
6 changed files with 18 additions and 12 deletions
|
|
@ -857,8 +857,11 @@ static void bdi_update_write_bandwidth(struct backing_dev_info *bdi,
|
|||
* bw * elapsed + write_bandwidth * (period - elapsed)
|
||||
* write_bandwidth = ---------------------------------------------------
|
||||
* period
|
||||
*
|
||||
* @written may have decreased due to account_page_redirty().
|
||||
* Avoid underflowing @bw calculation.
|
||||
*/
|
||||
bw = written - bdi->written_stamp;
|
||||
bw = written - min(written, bdi->written_stamp);
|
||||
bw *= HZ;
|
||||
if (unlikely(elapsed > period)) {
|
||||
do_div(bw, elapsed);
|
||||
|
|
@ -922,7 +925,7 @@ static void global_update_bandwidth(unsigned long thresh,
|
|||
unsigned long now)
|
||||
{
|
||||
static DEFINE_SPINLOCK(dirty_lock);
|
||||
static unsigned long update_time;
|
||||
static unsigned long update_time = INITIAL_JIFFIES;
|
||||
|
||||
/*
|
||||
* check locklessly first to optimize away locking for the most time
|
||||
|
|
|
|||
Loading…
Reference in a new issue