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
1e215a63
Commit
1e215a63
authored
Oct 18, 2002
by
Alexander Viro
Committed by
Linus Torvalds
Oct 18, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] stram switched to private queue
* switched to private queues * set ->queue
parent
50fbecd2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
12 deletions
+8
-12
arch/m68k/atari/stram.c
arch/m68k/atari/stram.c
+8
-12
No files found.
arch/m68k/atari/stram.c
View file @
1e215a63
...
@@ -978,17 +978,10 @@ static int refcnt = 0;
...
@@ -978,17 +978,10 @@ static int refcnt = 0;
static
void
do_stram_request
(
request_queue_t
*
q
)
static
void
do_stram_request
(
request_queue_t
*
q
)
{
{
void
*
start
;
while
(
!
blk_queue_empty
(
q
))
{
unsigned
long
len
;
struct
request
*
req
=
elv_next_request
(
q
);
void
*
start
=
swap_start
+
(
req
->
sector
<<
9
);
while
(
1
)
{
unsigned
long
len
=
req
->
current_nr_sectors
<<
9
;
struct
request
*
req
;
if
(
blk_queue_empty
(
QUEUE
))
return
;
req
=
CURRENT
;
start
=
swap_start
+
(
req
->
sector
<<
9
);
len
=
req
->
current_nr_sectors
<<
9
;
if
((
start
+
len
)
>
swap_end
)
{
if
((
start
+
len
)
>
swap_end
)
{
printk
(
KERN_ERR
"stram: bad access beyond end of device: "
printk
(
KERN_ERR
"stram: bad access beyond end of device: "
"block=%ld, count=%ld
\n
"
,
"block=%ld, count=%ld
\n
"
,
...
@@ -1045,6 +1038,8 @@ static struct block_device_operations stram_fops = {
...
@@ -1045,6 +1038,8 @@ static struct block_device_operations stram_fops = {
};
};
static
struct
gendisk
*
stram_disk
;
static
struct
gendisk
*
stram_disk
;
static
struct
request_queue
stram_queue
;
static
spinlock_t
stram_lock
=
SPIN_LOCK_UNLOCKED
;
int
__init
stram_device_init
(
void
)
int
__init
stram_device_init
(
void
)
{
{
...
@@ -1065,10 +1060,11 @@ int __init stram_device_init(void)
...
@@ -1065,10 +1060,11 @@ int __init stram_device_init(void)
return
-
ENXIO
;
return
-
ENXIO
;
}
}
blk_init_queue
(
BLK_DEFAULT_QUEUE
(
STRAM_MAJOR
),
do_stram_request
);
blk_init_queue
(
&
stram_queue
,
do_stram_request
,
&
stram_lock
);
stram_disk
->
major
=
STRAM_MAJOR
;
stram_disk
->
major
=
STRAM_MAJOR
;
stram_disk
->
first_minor
=
STRAM_MINOR
;
stram_disk
->
first_minor
=
STRAM_MINOR
;
stram_disk
->
fops
=
&
stram_fops
;
stram_disk
->
fops
=
&
stram_fops
;
stram_disk
->
queue
=
&
stram_queue
;
sprintf
(
stram_disk
->
disk_name
,
"stram"
);
sprintf
(
stram_disk
->
disk_name
,
"stram"
);
set_capacity
(
stram_disk
,
(
swap_end
-
swap_start
)
/
512
);
set_capacity
(
stram_disk
,
(
swap_end
-
swap_start
)
/
512
);
add_disk
(
stram_disk
);
add_disk
(
stram_disk
);
...
...
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