Commit 247aea28 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] Fix laptop mode writeback triggered by hdparm -y.

From: Bart Samwel <bart@samwel.tk>

Currently, an `hdparm -Y' can trigger a sync in laptop mode.  We should
only count fs-originated requests as being "disk activity".
parent 4e79ee42
......@@ -2732,7 +2732,7 @@ void end_that_request_last(struct request *req)
struct gendisk *disk = req->rq_disk;
struct completion *waiting = req->waiting;
if (unlikely(laptop_mode))
if (unlikely(laptop_mode) && blk_fs_request(req))
laptop_io_completion();
if (disk && blk_fs_request(req)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment