提交 7da21a02 编写于 作者: J Jens Axboe 提交者: Linus Torvalds

[PATCH] Avoid unnecessary ide-cd cache flushes

Only issue a cdrom cache flush if we've done write to the drive.  The
->media_written() flag keeps track of that.
Signed-off-by: NJens Axboe <axboe@suse.de>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 76530da1
......@@ -645,7 +645,7 @@ static int cdrom_mrw_exit(struct cdrom_device_info *cdi)
ret = cdrom_mrw_bgformat_susp(cdi, 0);
}
if (!ret)
if (!ret && cdi->media_written)
ret = cdrom_flush_cache(cdi);
return ret;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册