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
d7002d66
Commit
d7002d66
authored
Jan 07, 2003
by
Joe Thornber
Committed by
Trond Myklebust
Jan 07, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] dm: Don't let the ioctl interface drop a suspended device
Don't let the ioctl interface drop a suspended device.
parent
a10edc31
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
drivers/md/dm-ioctl.c
drivers/md/dm-ioctl.c
+18
-0
No files found.
drivers/md/dm-ioctl.c
View file @
d7002d66
...
...
@@ -812,6 +812,24 @@ static int remove(struct dm_ioctl *param, struct dm_ioctl *user)
return
-
EINVAL
;
}
/*
* You may ask the interface to drop its reference to an
* in use device. This is no different to unlinking a
* file that someone still has open. The device will not
* actually be destroyed until the last opener closes it.
* The name and uuid of the device (both are interface
* properties) will be available for reuse immediately.
*
* You don't want to drop a _suspended_ device from the
* interface, since that will leave you with no way of
* resuming it.
*/
if
(
dm_suspended
(
hc
->
md
))
{
DMWARN
(
"refusing to remove a suspended device."
);
up_write
(
&
_hash_lock
);
return
-
EPERM
;
}
__hash_remove
(
hc
);
up_write
(
&
_hash_lock
);
return
0
;
...
...
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