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
Kirill Smelkov
linux
Commits
a39907fa
Commit
a39907fa
authored
Mar 02, 2008
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] switch md
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
fe5f9f2c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
drivers/md/md.c
drivers/md/md.c
+10
-10
No files found.
drivers/md/md.c
View file @
a39907fa
...
...
@@ -4785,7 +4785,7 @@ static int md_getgeo(struct block_device *bdev, struct hd_geometry *geo)
return
0
;
}
static
int
md_ioctl
(
struct
inode
*
inode
,
struct
file
*
fil
e
,
static
int
md_ioctl
(
struct
block_device
*
bdev
,
fmode_t
mod
e
,
unsigned
int
cmd
,
unsigned
long
arg
)
{
int
err
=
0
;
...
...
@@ -4823,7 +4823,7 @@ static int md_ioctl(struct inode *inode, struct file *file,
* Commands creating/starting a new array:
*/
mddev
=
inode
->
i_
bdev
->
bd_disk
->
private_data
;
mddev
=
bdev
->
bd_disk
->
private_data
;
if
(
!
mddev
)
{
BUG
();
...
...
@@ -4996,13 +4996,13 @@ static int md_ioctl(struct inode *inode, struct file *file,
return
err
;
}
static
int
md_open
(
struct
inode
*
inode
,
struct
file
*
fil
e
)
static
int
md_open
(
struct
block_device
*
bdev
,
fmode_t
mod
e
)
{
/*
* Succeed if we can lock the mddev, which confirms that
* it isn't being stopped right now.
*/
mddev_t
*
mddev
=
inode
->
i_
bdev
->
bd_disk
->
private_data
;
mddev_t
*
mddev
=
bdev
->
bd_disk
->
private_data
;
int
err
;
if
((
err
=
mutex_lock_interruptible_nested
(
&
mddev
->
reconfig_mutex
,
1
)))
...
...
@@ -5013,14 +5013,14 @@ static int md_open(struct inode *inode, struct file *file)
atomic_inc
(
&
mddev
->
openers
);
mddev_unlock
(
mddev
);
check_disk_change
(
inode
->
i_
bdev
);
check_disk_change
(
bdev
);
out:
return
err
;
}
static
int
md_release
(
struct
inode
*
inode
,
struct
file
*
fil
e
)
static
int
md_release
(
struct
gendisk
*
disk
,
fmode_t
mod
e
)
{
mddev_t
*
mddev
=
inode
->
i_bdev
->
bd_
disk
->
private_data
;
mddev_t
*
mddev
=
disk
->
private_data
;
BUG_ON
(
!
mddev
);
atomic_dec
(
&
mddev
->
openers
);
...
...
@@ -5046,9 +5046,9 @@ static int md_revalidate(struct gendisk *disk)
static
struct
block_device_operations
md_fops
=
{
.
owner
=
THIS_MODULE
,
.
__
open
=
md_open
,
.
__
release
=
md_release
,
.
__ioctl
=
md_ioctl
,
.
open
=
md_open
,
.
release
=
md_release
,
.
locked_ioctl
=
md_ioctl
,
.
getgeo
=
md_getgeo
,
.
media_changed
=
md_media_changed
,
.
revalidate_disk
=
md_revalidate
,
...
...
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