Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 282111
b: refs/heads/master
c: 54f5758
h: refs/heads/master
i:
  282109: c9b5e36
  282107: 8b00db5
  282103: ea4a2d2
  282095: 14752cc
  282079: 790d504
  282047: a529613
  281983: 1d8411c
  281855: 96046de
  281599: 76c2e7f
v: v3
  • Loading branch information
Lin Ming authored and Jeff Garzik committed Jan 9, 2012
1 parent 56fd18e commit 05dd57c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 286405167e815adc4ae0132214246a350b0208bc
refs/heads/master: 54f57588463db1105f4a93b2902a6f95cb8f796a
5 changes: 5 additions & 0 deletions trunk/drivers/scsi/sd.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
#include <linux/string_helpers.h>
#include <linux/async.h>
#include <linux/slab.h>
#include <linux/pm_runtime.h>
#include <asm/uaccess.h>
#include <asm/unaligned.h>

Expand Down Expand Up @@ -2741,6 +2742,9 @@ static void sd_shutdown(struct device *dev)
if (!sdkp)
return; /* this can happen */

if (pm_runtime_suspended(dev))
goto exit;

if (sdkp->WCE) {
sd_printk(KERN_NOTICE, sdkp, "Synchronizing SCSI cache\n");
sd_sync_cache(sdkp);
Expand All @@ -2751,6 +2755,7 @@ static void sd_shutdown(struct device *dev)
sd_start_stop_device(sdkp, 0);
}

exit:
scsi_disk_put(sdkp);
}

Expand Down

0 comments on commit 05dd57c

Please sign in to comment.