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
4c80105e
Commit
4c80105e
authored
Apr 12, 2024
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bdev: move ->bd_write_holder into ->__bd_flags
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
01e198f0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
block/bdev.c
block/bdev.c
+5
-4
include/linux/blk_types.h
include/linux/blk_types.h
+1
-1
No files found.
block/bdev.c
View file @
4c80105e
...
...
@@ -624,7 +624,7 @@ static void bd_end_claim(struct block_device *bdev, void *holder)
bdev
->
bd_holder
=
NULL
;
bdev
->
bd_holder_ops
=
NULL
;
mutex_unlock
(
&
bdev
->
bd_holder_lock
);
if
(
bdev
->
bd_write_holder
)
if
(
bdev
_test_flag
(
bdev
,
BD_WRITE_HOLDER
)
)
unblock
=
true
;
}
if
(
!
whole
->
bd_holders
)
...
...
@@ -640,7 +640,7 @@ static void bd_end_claim(struct block_device *bdev, void *holder)
*/
if
(
unblock
)
{
disk_unblock_events
(
bdev
->
bd_disk
);
bdev
->
bd_write_holder
=
false
;
bdev
_clear_flag
(
bdev
,
BD_WRITE_HOLDER
)
;
}
}
...
...
@@ -892,9 +892,10 @@ int bdev_open(struct block_device *bdev, blk_mode_t mode, void *holder,
* writeable reference is too fragile given the way @mode is
* used in blkdev_get/put().
*/
if
((
mode
&
BLK_OPEN_WRITE
)
&&
!
bdev
->
bd_write_holder
&&
if
((
mode
&
BLK_OPEN_WRITE
)
&&
!
bdev_test_flag
(
bdev
,
BD_WRITE_HOLDER
)
&&
(
disk
->
event_flags
&
DISK_EVENT_FLAG_BLOCK_ON_EXCL_WRITE
))
{
bdev
->
bd_write_holder
=
true
;
bdev
_set_flag
(
bdev
,
BD_WRITE_HOLDER
)
;
unblock_events
=
false
;
}
}
...
...
include/linux/blk_types.h
View file @
4c80105e
...
...
@@ -48,7 +48,7 @@ struct block_device {
atomic_t
__bd_flags
;
// partition number + flags
#define BD_PARTNO 255 // lower 8 bits; assign-once
#define BD_READ_ONLY (1u<<8) // read-only policy
bool
bd_write_holder
;
#define BD_WRITE_HOLDER (1u<<9)
bool
bd_has_submit_bio
;
dev_t
bd_dev
;
struct
inode
*
bd_inode
;
/* will die */
...
...
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