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
c03285bf
Commit
c03285bf
authored
Apr 09, 2002
by
Alexander Viro
Committed by
Linus Torvalds
Apr 09, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] mtdblock fixes
Assorted compile fixes in mtdblock.c
parent
9cdf73b0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
drivers/mtd/mtdblock.c
drivers/mtd/mtdblock.c
+6
-6
No files found.
drivers/mtd/mtdblock.c
View file @
c03285bf
...
@@ -413,7 +413,7 @@ static void handle_mtdblock_request(void)
...
@@ -413,7 +413,7 @@ static void handle_mtdblock_request(void)
for
(;;)
{
for
(;;)
{
INIT_REQUEST
;
INIT_REQUEST
;
req
=
CURRENT
;
req
=
CURRENT
;
spin_unlock_irq
(
&
QUEUE
->
queue_lock
);
spin_unlock_irq
(
QUEUE
->
queue_lock
);
mtdblk
=
mtdblks
[
minor
(
req
->
rq_dev
)];
mtdblk
=
mtdblks
[
minor
(
req
->
rq_dev
)];
res
=
0
;
res
=
0
;
...
@@ -457,7 +457,7 @@ static void handle_mtdblock_request(void)
...
@@ -457,7 +457,7 @@ static void handle_mtdblock_request(void)
}
}
end_req:
end_req:
spin_lock_irq
(
&
QUEUE
->
queue_lock
);
spin_lock_irq
(
QUEUE
->
queue_lock
);
if
(
!
end_that_request_first
(
req
,
res
,
req
->
hard_cur_sectors
))
{
if
(
!
end_that_request_first
(
req
,
res
,
req
->
hard_cur_sectors
))
{
blkdev_dequeue_request
(
req
);
blkdev_dequeue_request
(
req
);
end_that_request_last
(
req
);
end_that_request_last
(
req
);
...
@@ -487,16 +487,16 @@ int mtdblock_thread(void *dummy)
...
@@ -487,16 +487,16 @@ int mtdblock_thread(void *dummy)
while
(
!
leaving
)
{
while
(
!
leaving
)
{
add_wait_queue
(
&
thr_wq
,
&
wait
);
add_wait_queue
(
&
thr_wq
,
&
wait
);
set_current_state
(
TASK_INTERRUPTIBLE
);
set_current_state
(
TASK_INTERRUPTIBLE
);
spin_lock_irq
(
&
QUEUE
->
queue_lock
);
spin_lock_irq
(
QUEUE
->
queue_lock
);
if
(
QUEUE_EMPTY
||
QUEUE_PLUGGED
)
{
if
(
QUEUE_EMPTY
||
QUEUE_PLUGGED
)
{
spin_unlock_irq
(
&
QUEUE
->
queue_lock
);
spin_unlock_irq
(
QUEUE
->
queue_lock
);
schedule
();
schedule
();
remove_wait_queue
(
&
thr_wq
,
&
wait
);
remove_wait_queue
(
&
thr_wq
,
&
wait
);
}
else
{
}
else
{
remove_wait_queue
(
&
thr_wq
,
&
wait
);
remove_wait_queue
(
&
thr_wq
,
&
wait
);
set_current_state
(
TASK_RUNNING
);
set_current_state
(
TASK_RUNNING
);
handle_mtdblock_request
();
handle_mtdblock_request
();
spin_unlock_irq
(
&
QUEUE
->
queue_lock
);
spin_unlock_irq
(
QUEUE
->
queue_lock
);
}
}
}
}
...
@@ -541,7 +541,7 @@ static int mtdblock_ioctl(struct inode * inode, struct file * file,
...
@@ -541,7 +541,7 @@ static int mtdblock_ioctl(struct inode * inode, struct file * file,
return
-
EACCES
;
return
-
EACCES
;
#endif
#endif
fsync_bdev
(
inode
->
i_bdev
);
fsync_bdev
(
inode
->
i_bdev
);
invalidate_bdev
(
inode
->
b_r
dev
,
0
);
invalidate_bdev
(
inode
->
i_b
dev
,
0
);
down
(
&
mtdblk
->
cache_sem
);
down
(
&
mtdblk
->
cache_sem
);
write_cached_data
(
mtdblk
);
write_cached_data
(
mtdblk
);
up
(
&
mtdblk
->
cache_sem
);
up
(
&
mtdblk
->
cache_sem
);
...
...
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