Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
f6d999f9
Commit
f6d999f9
authored
Oct 05, 2002
by
James Bottomley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SCSI] sd moved synchronisation from release to detach
parent
be48b57a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
drivers/scsi/sd.c
drivers/scsi/sd.c
+10
-10
No files found.
drivers/scsi/sd.c
View file @
f6d999f9
...
...
@@ -580,13 +580,6 @@ static int sd_release(struct inode *inode, struct file *filp)
if
(
sd_template
.
module
)
__MOD_DEC_USE_COUNT
(
sd_template
.
module
);
/* check that we actually have a write back cache to synchronize */
if
(
sdkp
->
WCE
)
{
printk
(
KERN_NOTICE
"Synchronizing SCSI cache: "
);
sd_synchronize_cache
(
dsk_nr
,
1
);
printk
(
"
\n
"
);
}
return
0
;
}
...
...
@@ -1477,9 +1470,6 @@ static void sd_detach(Scsi_Device * sdp)
for
(
dsk_nr
=
0
;
dsk_nr
<
sd_template
.
dev_max
;
dsk_nr
++
)
{
sdkp
=
sd_dsk_arr
[
dsk_nr
];
if
(
sdkp
->
device
==
sdp
)
{
sdkp
->
device
=
NULL
;
sdkp
->
capacity
=
0
;
/* sdkp->detaching = 1; */
break
;
}
}
...
...
@@ -1487,6 +1477,16 @@ static void sd_detach(Scsi_Device * sdp)
if
(
dsk_nr
>=
sd_template
.
dev_max
)
return
;
/* check that we actually have a write back cache to synchronize */
if
(
sdkp
->
WCE
)
{
printk
(
KERN_NOTICE
"Synchronizing SCSI cache: "
);
sd_synchronize_cache
(
dsk_nr
,
1
);
printk
(
"
\n
"
);
}
sdkp
->
device
=
NULL
;
sdkp
->
capacity
=
0
;
/* sdkp->detaching = 1; */
if
(
sdkp
->
has_been_registered
)
{
sdkp
->
has_been_registered
=
0
;
dev
=
MKDEV_SD
(
dsk_nr
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment