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
fe5f9f2c
Commit
fe5f9f2c
authored
Mar 02, 2008
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] switch dm
ioctl() doesn't need BKL here Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
a4600f81
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
21 deletions
+10
-21
drivers/md/dm.c
drivers/md/dm.c
+10
-21
No files found.
drivers/md/dm.c
View file @
fe5f9f2c
...
...
@@ -21,7 +21,6 @@
#include <linux/idr.h>
#include <linux/hdreg.h>
#include <linux/blktrace_api.h>
#include <linux/smp_lock.h>
#define DM_MSG_PREFIX "core"
...
...
@@ -249,13 +248,13 @@ static void __exit dm_exit(void)
/*
* Block device functions
*/
static
int
dm_blk_open
(
struct
inode
*
inode
,
struct
file
*
fil
e
)
static
int
dm_blk_open
(
struct
block_device
*
bdev
,
fmode_t
mod
e
)
{
struct
mapped_device
*
md
;
spin_lock
(
&
_minor_lock
);
md
=
inode
->
i_
bdev
->
bd_disk
->
private_data
;
md
=
bdev
->
bd_disk
->
private_data
;
if
(
!
md
)
goto
out
;
...
...
@@ -274,11 +273,9 @@ static int dm_blk_open(struct inode *inode, struct file *file)
return
md
?
0
:
-
ENXIO
;
}
static
int
dm_blk_close
(
struct
inode
*
inode
,
struct
file
*
fil
e
)
static
int
dm_blk_close
(
struct
gendisk
*
disk
,
fmode_t
mod
e
)
{
struct
mapped_device
*
md
;
md
=
inode
->
i_bdev
->
bd_disk
->
private_data
;
struct
mapped_device
*
md
=
disk
->
private_data
;
atomic_dec
(
&
md
->
open_count
);
dm_put
(
md
);
return
0
;
...
...
@@ -315,21 +312,14 @@ static int dm_blk_getgeo(struct block_device *bdev, struct hd_geometry *geo)
return
dm_get_geometry
(
md
,
geo
);
}
static
int
dm_blk_ioctl
(
struct
inode
*
inode
,
struct
file
*
fil
e
,
static
int
dm_blk_ioctl
(
struct
block_device
*
bdev
,
fmode_t
mod
e
,
unsigned
int
cmd
,
unsigned
long
arg
)
{
struct
mapped_device
*
md
;
struct
dm_table
*
map
;
struct
mapped_device
*
md
=
bdev
->
bd_disk
->
private_data
;
struct
dm_table
*
map
=
dm_get_table
(
md
)
;
struct
dm_target
*
tgt
;
int
r
=
-
ENOTTY
;
/* We don't really need this lock, but we do need 'inode'. */
unlock_kernel
();
md
=
inode
->
i_bdev
->
bd_disk
->
private_data
;
map
=
dm_get_table
(
md
);
if
(
!
map
||
!
dm_table_get_size
(
map
))
goto
out
;
...
...
@@ -350,7 +340,6 @@ static int dm_blk_ioctl(struct inode *inode, struct file *file,
out:
dm_table_put
(
map
);
lock_kernel
();
return
r
;
}
...
...
@@ -1698,9 +1687,9 @@ int dm_noflush_suspending(struct dm_target *ti)
EXPORT_SYMBOL_GPL
(
dm_noflush_suspending
);
static
struct
block_device_operations
dm_blk_dops
=
{
.
__
open
=
dm_blk_open
,
.
__
release
=
dm_blk_close
,
.
__
ioctl
=
dm_blk_ioctl
,
.
open
=
dm_blk_open
,
.
release
=
dm_blk_close
,
.
ioctl
=
dm_blk_ioctl
,
.
getgeo
=
dm_blk_getgeo
,
.
owner
=
THIS_MODULE
};
...
...
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