diff options
author | Jens Axboe <axboe@suse.de> | 2005-05-01 12:12:52 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-05-01 12:12:52 -0700 |
commit | 7da21a02b3587157bd43910ea6d4c76661228ebb (patch) | |
tree | 192ac868b9d0854d31fb04a21a968796892cbf94 /drivers/cdrom | |
parent | 76530da1a9e8ce05963b1f49a098eddc6ec6c534 (diff) | |
download | linux-3.10-7da21a02b3587157bd43910ea6d4c76661228ebb.tar.gz linux-3.10-7da21a02b3587157bd43910ea6d4c76661228ebb.tar.bz2 linux-3.10-7da21a02b3587157bd43910ea6d4c76661228ebb.zip |
[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: Jens Axboe <axboe@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/cdrom')
-rw-r--r-- | drivers/cdrom/cdrom.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c index 9deca49c71f..beaa561f2ed 100644 --- a/drivers/cdrom/cdrom.c +++ b/drivers/cdrom/cdrom.c @@ -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; |