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
96d333c6
Commit
96d333c6
authored
Nov 23, 2007
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Import 2.3.99pre4-4
parent
0239d6ee
Changes
38
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
38 changed files
with
493 additions
and
212 deletions
+493
-212
Documentation/DocBook/Makefile
Documentation/DocBook/Makefile
+5
-1
bad
bad
+0
-22
drivers/block/ll_rw_blk.c
drivers/block/ll_rw_blk.c
+13
-15
drivers/block/paride/pcd.c
drivers/block/paride/pcd.c
+1
-1
drivers/block/paride/pd.c
drivers/block/paride/pd.c
+61
-15
drivers/block/paride/pf.c
drivers/block/paride/pf.c
+61
-15
drivers/char/pcwd.c
drivers/char/pcwd.c
+1
-32
drivers/char/ppdev.c
drivers/char/ppdev.c
+1
-1
drivers/ide/ide-disk.c
drivers/ide/ide-disk.c
+12
-8
drivers/ide/ide.c
drivers/ide/ide.c
+1
-0
drivers/net/wan/cycx_drv.c
drivers/net/wan/cycx_drv.c
+11
-14
drivers/net/wan/cycx_main.c
drivers/net/wan/cycx_main.c
+14
-12
drivers/net/wan/cycx_x25.c
drivers/net/wan/cycx_x25.c
+15
-9
drivers/parport/share.c
drivers/parport/share.c
+199
-6
fs/autofs4/expire.c
fs/autofs4/expire.c
+2
-4
fs/autofs4/symlink.c
fs/autofs4/symlink.c
+1
-1
fs/dquot.c
fs/dquot.c
+4
-3
fs/lockd/clntproc.c
fs/lockd/clntproc.c
+5
-13
fs/lockd/svc4proc.c
fs/lockd/svc4proc.c
+0
-1
fs/lockd/svclock.c
fs/lockd/svclock.c
+0
-1
fs/lockd/svcproc.c
fs/lockd/svcproc.c
+0
-1
fs/nfs/flushd.c
fs/nfs/flushd.c
+0
-1
fs/nfs/read.c
fs/nfs/read.c
+0
-1
fs/nfs/write.c
fs/nfs/write.c
+4
-3
fs/open.c
fs/open.c
+5
-4
include/linux/blkdev.h
include/linux/blkdev.h
+1
-0
include/linux/cycx_x25.h
include/linux/cycx_x25.h
+6
-0
include/linux/fs.h
include/linux/fs.h
+1
-1
include/linux/mm.h
include/linux/mm.h
+4
-1
include/linux/sunrpc/sched.h
include/linux/sunrpc/sched.h
+1
-0
mm/filemap.c
mm/filemap.c
+2
-2
mm/memory.c
mm/memory.c
+1
-1
mm/page_alloc.c
mm/page_alloc.c
+2
-0
mm/swap_state.c
mm/swap_state.c
+5
-2
mm/swapfile.c
mm/swapfile.c
+1
-1
net/sunrpc/clnt.c
net/sunrpc/clnt.c
+5
-6
net/sunrpc/sched.c
net/sunrpc/sched.c
+48
-13
net/sunrpc/sunrpc_syms.c
net/sunrpc/sunrpc_syms.c
+0
-1
No files found.
Documentation/DocBook/Makefile
View file @
96d333c6
BOOKS
:=
wanbook.sgml z8530book.sgml mcabook.sgml videobook.sgml kernel-api.sgml
BOOKS
:=
wanbook.sgml z8530book.sgml mcabook.sgml videobook.sgml kernel-api.sgml
parportbook.sgml
PS
:=
$(
patsubst
%.sgml, %.ps,
$(BOOKS)
)
PDF
:=
$(
patsubst
%.sgml, %.pdf,
$(BOOKS)
)
...
...
@@ -47,6 +47,10 @@ kernel-api.sgml: kernel-api.tmpl
$(TOPDIR)
/net/netsyms.c
\
<kernel-api.tmpl
>
kernel-api.sgml
parportbook.sgml
:
parportbook.tmpl
$(TOPDIR)
/scripts/docgen
$(TOPDIR)
/drivers/parport/init.c
\
<parportbook.tmpl
>
parportbook.sgml
DVI
:=
$(
patsubst
%.sgml, %.dvi,
$(BOOKS)
)
AUX
:=
$(
patsubst
%.sgml, %.aux,
$(BOOKS)
)
TEX
:=
$(
patsubst
%.sgml, %.tex,
$(BOOKS)
)
...
...
bad
deleted
100644 → 0
View file @
0239d6ee
--- drivers/usb/usb-storage.c.orig Thu Mar 30 20:31:08 2000
+++ drivers/usb/usb-storage.c Sun Apr 2 15:20:21 2000
@@ -1417,6 +1418,9 @@
/* lock the device pointers */
spin_lock_irqsave(&(us->dev_spinlock), flags);
+ /* lock the device pointers */
+ spin_lock_irqsave(&(us->dev_spinlock), flags);
+
/* our device has gone - pretend not ready */
/* FIXME: we also need to handle INQUIRY here,
* probably */
@@ -1862,6 +1866,9 @@
US_DEBUGP("-- device was not in use\n");
return;
}
+
+ /* lock access to the device data structure */
+ spin_lock_irqsave(&(ss->dev_spinlock), flags);
/* lock access to the device data structure */
spin_lock_irqsave(&(ss->dev_spinlock), flags);
drivers/block/ll_rw_blk.c
View file @
96d333c6
...
...
@@ -481,7 +481,7 @@ static void attempt_merge(request_queue_t * q,
elevator_merge_requests
(
&
q
->
elevator
,
req
,
next
);
req
->
bhtail
->
b_reqnext
=
next
->
bh
;
req
->
bhtail
=
next
->
bhtail
;
req
->
nr_sectors
+=
next
->
nr_sectors
;
req
->
nr_sectors
=
req
->
hard_nr_sectors
+=
next
->
hard_
nr_sectors
;
next
->
rq_status
=
RQ_INACTIVE
;
list_del
(
&
next
->
queue
);
wake_up
(
&
wait_for_request
);
...
...
@@ -685,7 +685,7 @@ static inline void __make_request(request_queue_t * q, int rw,
break
;
req
->
bhtail
->
b_reqnext
=
bh
;
req
->
bhtail
=
bh
;
req
->
nr_sectors
+=
count
;
req
->
nr_sectors
=
req
->
hard_nr_sectors
+=
count
;
drive_stat_acct
(
req
,
count
,
0
);
elevator_merge_after
(
elevator
,
req
,
latency
);
...
...
@@ -714,8 +714,8 @@ static inline void __make_request(request_queue_t * q, int rw,
req
->
bh
=
bh
;
req
->
buffer
=
bh
->
b_data
;
req
->
current_nr_sectors
=
count
;
req
->
sector
=
sector
;
req
->
nr_sectors
+=
count
;
req
->
sector
=
req
->
hard_sector
=
sector
;
req
->
nr_sectors
=
req
->
hard_nr_sectors
+=
count
;
drive_stat_acct
(
req
,
count
,
0
);
elevator_merge_before
(
elevator
,
req
,
latency
);
...
...
@@ -754,8 +754,8 @@ static inline void __make_request(request_queue_t * q, int rw,
/* fill up the request-info, and add it to the queue */
req
->
cmd
=
rw
;
req
->
errors
=
0
;
req
->
sector
=
sector
;
req
->
nr_sectors
=
count
;
req
->
hard_sector
=
req
->
sector
=
sector
;
req
->
hard_nr_sectors
=
req
->
nr_sectors
=
count
;
req
->
current_nr_sectors
=
count
;
req
->
nr_segments
=
1
;
/* Always 1 for a new request. */
req
->
nr_hw_segments
=
1
;
/* Always 1 for a new request. */
...
...
@@ -920,23 +920,21 @@ int end_that_request_first (struct request *req, int uptodate, char *name)
int
nsect
;
req
->
errors
=
0
;
if
(
!
uptodate
)
{
if
(
!
uptodate
)
printk
(
"end_request: I/O error, dev %s (%s), sector %lu
\n
"
,
kdevname
(
req
->
rq_dev
),
name
,
req
->
sector
);
if
((
bh
=
req
->
bh
)
!=
NULL
)
{
nsect
=
bh
->
b_size
>>
9
;
req
->
nr_sectors
--
;
req
->
nr_sectors
&=
~
(
nsect
-
1
);
req
->
sector
+=
nsect
;
req
->
sector
&=
~
(
nsect
-
1
);
}
}
if
((
bh
=
req
->
bh
)
!=
NULL
)
{
nsect
=
bh
->
b_size
>>
9
;
req
->
bh
=
bh
->
b_reqnext
;
bh
->
b_reqnext
=
NULL
;
bh
->
b_end_io
(
bh
,
uptodate
);
if
((
bh
=
req
->
bh
)
!=
NULL
)
{
req
->
hard_sector
+=
nsect
;
req
->
hard_nr_sectors
-=
nsect
;
req
->
sector
=
req
->
hard_sector
;
req
->
nr_sectors
=
req
->
hard_nr_sectors
;
req
->
current_nr_sectors
=
bh
->
b_size
>>
9
;
if
(
req
->
nr_sectors
<
req
->
current_nr_sectors
)
{
req
->
nr_sectors
=
req
->
current_nr_sectors
;
...
...
drivers/block/paride/pcd.c
View file @
96d333c6
...
...
@@ -765,7 +765,7 @@ static void do_pcd_request (request_queue_t * q)
pcd_unit
=
unit
;
}
pcd_sector
=
CURRENT
->
sector
;
pcd_count
=
CURRENT
->
nr_sectors
;
pcd_count
=
CURRENT
->
current_
nr_sectors
;
pcd_buf
=
CURRENT
->
buffer
;
pcd_busy
=
1
;
ps_set_intr
(
do_pcd_read
,
0
,
0
,
nice
);
...
...
drivers/block/paride/pd.c
View file @
96d333c6
...
...
@@ -385,9 +385,62 @@ void pd_init_units( void )
}
}
static
inline
int
pd_new_segment
(
request_queue_t
*
q
,
struct
request
*
req
,
int
max_segments
)
{
if
(
max_segments
>
cluster
)
max_segments
=
cluster
;
if
(
req
->
nr_segments
<
max_segments
)
{
req
->
nr_segments
++
;
q
->
elevator
.
nr_segments
++
;
return
1
;
}
return
0
;
}
static
int
pd_back_merge_fn
(
request_queue_t
*
q
,
struct
request
*
req
,
struct
buffer_head
*
bh
,
int
max_segments
)
{
if
(
req
->
bhtail
->
b_data
+
req
->
bhtail
->
b_size
==
bh
->
b_data
)
return
1
;
return
pd_new_segment
(
q
,
req
,
max_segments
);
}
static
int
pd_front_merge_fn
(
request_queue_t
*
q
,
struct
request
*
req
,
struct
buffer_head
*
bh
,
int
max_segments
)
{
if
(
bh
->
b_data
+
bh
->
b_size
==
req
->
bh
->
b_data
)
return
1
;
return
pd_new_segment
(
q
,
req
,
max_segments
);
}
static
int
pd_merge_requests_fn
(
request_queue_t
*
q
,
struct
request
*
req
,
struct
request
*
next
,
int
max_segments
)
{
int
total_segments
=
req
->
nr_segments
+
next
->
nr_segments
;
int
same_segment
;
if
(
max_segments
>
cluster
)
max_segments
=
cluster
;
same_segment
=
0
;
if
(
req
->
bhtail
->
b_data
+
req
->
bhtail
->
b_size
==
next
->
bh
->
b_data
)
{
total_segments
--
;
same_segment
=
1
;
}
if
(
total_segments
>
max_segments
)
return
0
;
q
->
elevator
.
nr_segments
-=
same_segment
;
req
->
nr_segments
=
total_segments
;
return
1
;
}
int
pd_init
(
void
)
{
int
i
;
request_queue_t
*
q
;
if
(
disable
)
return
-
1
;
if
(
devfs_register_blkdev
(
MAJOR_NR
,
name
,
&
pd_fops
))
{
...
...
@@ -395,7 +448,11 @@ int pd_init (void)
name
,
major
);
return
-
1
;
}
blk_init_queue
(
BLK_DEFAULT_QUEUE
(
MAJOR_NR
),
DEVICE_REQUEST
);
q
=
BLK_DEFAULT_QUEUE
(
MAJOR_NR
);
blk_init_queue
(
q
,
DEVICE_REQUEST
);
q
->
back_merge_fn
=
pd_back_merge_fn
;
q
->
front_merge_fn
=
pd_front_merge_fn
;
q
->
merge_requests_fn
=
pd_merge_requests_fn
;
read_ahead
[
MAJOR_NR
]
=
8
;
/* 8 sector (4kB) read ahead */
pd_gendisk
.
major
=
major
;
...
...
@@ -865,7 +922,6 @@ static int pd_ready( void )
static
void
do_pd_request
(
request_queue_t
*
q
)
{
struct
buffer_head
*
bh
;
struct
request
*
req
;
int
unit
;
if
(
pd_busy
)
return
;
...
...
@@ -876,12 +932,10 @@ static void do_pd_request (request_queue_t * q)
pd_dev
=
MINOR
(
CURRENT
->
rq_dev
);
pd_unit
=
unit
=
DEVICE_NR
(
CURRENT
->
rq_dev
);
pd_block
=
CURRENT
->
sector
;
pd_count
=
CURRENT
->
nr_sectors
;
pd_run
=
CURRENT
->
nr_sectors
;
pd_count
=
CURRENT
->
current_nr_sectors
;
bh
=
CURRENT
->
bh
;
req
=
CURRENT
;
if
(
bh
->
b_reqnext
)
printk
(
"%s: OUCH: b_reqnext != NULL
\n
"
,
PD
.
name
);
if
((
pd_dev
>=
PD_DEVS
)
||
((
pd_block
+
pd_count
)
>
pd_hd
[
pd_dev
].
nr_sects
))
{
...
...
@@ -890,14 +944,6 @@ static void do_pd_request (request_queue_t * q)
}
pd_cmd
=
CURRENT
->
cmd
;
pd_run
=
pd_count
;
while
((
pd_run
<=
cluster
)
&&
(
req
=
blkdev_next_request
(
req
))
&&
(
pd_block
+
pd_run
==
req
->
sector
)
&&
(
pd_cmd
==
req
->
cmd
)
&&
(
pd_dev
==
MINOR
(
req
->
rq_dev
)))
pd_run
+=
req
->
nr_sectors
;
pd_poffs
=
pd_hd
[
pd_dev
].
start_sect
;
pd_block
+=
pd_poffs
;
pd_buf
=
CURRENT
->
buffer
;
...
...
@@ -932,7 +978,7 @@ static void pd_next_buf( int unit )
printk
(
"%s: OUCH: request list changed unexpectedly
\n
"
,
PD
.
name
);
pd_count
=
CURRENT
->
nr_sectors
;
pd_count
=
CURRENT
->
current_
nr_sectors
;
pd_buf
=
CURRENT
->
buffer
;
spin_unlock_irqrestore
(
&
io_request_lock
,
saved_flags
);
}
...
...
drivers/block/paride/pf.c
View file @
96d333c6
...
...
@@ -339,9 +339,62 @@ void pf_init_units( void )
}
}
static
inline
int
pf_new_segment
(
request_queue_t
*
q
,
struct
request
*
req
,
int
max_segments
)
{
if
(
max_segments
>
cluster
)
max_segments
=
cluster
;
if
(
req
->
nr_segments
<
max_segments
)
{
req
->
nr_segments
++
;
q
->
elevator
.
nr_segments
++
;
return
1
;
}
return
0
;
}
static
int
pf_back_merge_fn
(
request_queue_t
*
q
,
struct
request
*
req
,
struct
buffer_head
*
bh
,
int
max_segments
)
{
if
(
req
->
bhtail
->
b_data
+
req
->
bhtail
->
b_size
==
bh
->
b_data
)
return
1
;
return
pf_new_segment
(
q
,
req
,
max_segments
);
}
static
int
pf_front_merge_fn
(
request_queue_t
*
q
,
struct
request
*
req
,
struct
buffer_head
*
bh
,
int
max_segments
)
{
if
(
bh
->
b_data
+
bh
->
b_size
==
req
->
bh
->
b_data
)
return
1
;
return
pf_new_segment
(
q
,
req
,
max_segments
);
}
static
int
pf_merge_requests_fn
(
request_queue_t
*
q
,
struct
request
*
req
,
struct
request
*
next
,
int
max_segments
)
{
int
total_segments
=
req
->
nr_segments
+
next
->
nr_segments
;
int
same_segment
;
if
(
max_segments
>
cluster
)
max_segments
=
cluster
;
same_segment
=
0
;
if
(
req
->
bhtail
->
b_data
+
req
->
bhtail
->
b_size
==
next
->
bh
->
b_data
)
{
total_segments
--
;
same_segment
=
1
;
}
if
(
total_segments
>
max_segments
)
return
0
;
q
->
elevator
.
nr_segments
-=
same_segment
;
req
->
nr_segments
=
total_segments
;
return
1
;
}
int
pf_init
(
void
)
/* preliminary initialisation */
{
int
i
;
request_queue_t
*
q
;
if
(
disable
)
return
-
1
;
...
...
@@ -355,7 +408,11 @@ int pf_init (void) /* preliminary initialisation */
major
);
return
-
1
;
}
blk_init_queue
(
BLK_DEFAULT_QUEUE
(
MAJOR_NR
),
DEVICE_REQUEST
);
q
=
BLK_DEFAULT_QUEUE
(
MAJOR_NR
);
blk_init_queue
(
q
,
DEVICE_REQUEST
);
q
->
back_merge_fn
=
pf_back_merge_fn
;
q
->
front_merge_fn
=
pf_front_merge_fn
;
q
->
merge_requests_fn
=
pf_merge_requests_fn
;
read_ahead
[
MAJOR_NR
]
=
8
;
/* 8 sector (4kB) read ahead */
for
(
i
=
0
;
i
<
PF_UNITS
;
i
++
)
pf_blocksizes
[
i
]
=
1024
;
...
...
@@ -849,7 +906,6 @@ static int pf_ready( void )
static
void
do_pf_request
(
request_queue_t
*
q
)
{
struct
buffer_head
*
bh
;
struct
request
*
req
;
int
unit
;
if
(
pf_busy
)
return
;
...
...
@@ -859,12 +915,10 @@ static void do_pf_request (request_queue_t * q)
pf_unit
=
unit
=
DEVICE_NR
(
CURRENT
->
rq_dev
);
pf_block
=
CURRENT
->
sector
;
pf_count
=
CURRENT
->
nr_sectors
;
pf_run
=
CURRENT
->
nr_sectors
;
pf_count
=
CURRENT
->
current_nr_sectors
;
bh
=
CURRENT
->
bh
;
req
=
CURRENT
;
if
(
bh
->
b_reqnext
)
printk
(
"%s: OUCH: b_reqnext != NULL
\n
"
,
PF
.
name
);
if
((
pf_unit
>=
PF_UNITS
)
||
(
pf_block
+
pf_count
>
PF
.
capacity
))
{
end_request
(
0
);
...
...
@@ -872,14 +926,6 @@ static void do_pf_request (request_queue_t * q)
}
pf_cmd
=
CURRENT
->
cmd
;
pf_run
=
pf_count
;
while
((
pf_run
<=
cluster
)
&&
(
req
=
blkdev_next_request
(
req
))
&&
(
pf_block
+
pf_run
==
req
->
sector
)
&&
(
pf_cmd
==
req
->
cmd
)
&&
(
pf_unit
==
DEVICE_NR
(
req
->
rq_dev
)))
pf_run
+=
req
->
nr_sectors
;
pf_buf
=
CURRENT
->
buffer
;
pf_retries
=
0
;
...
...
@@ -912,7 +958,7 @@ static void pf_next_buf( int unit )
printk
(
"%s: OUCH: request list changed unexpectedly
\n
"
,
PF
.
name
);
pf_count
=
CURRENT
->
nr_sectors
;
pf_count
=
CURRENT
->
current_
nr_sectors
;
pf_buf
=
CURRENT
->
buffer
;
spin_unlock_irqrestore
(
&
io_request_lock
,
saved_flags
);
}
...
...
drivers/char/pcwd.c
View file @
96d333c6
...
...
@@ -39,6 +39,7 @@
* 990605 Made changes to code to support Firmware 1.22a, added
* fairly useless proc entry.
* 990610 removed said useless proc code for the merge <alan>
* 000403 Removed last traces of proc code. <davej>
*/
#include <linux/module.h>
...
...
@@ -541,38 +542,6 @@ static void debug_off(void)
mode_debug
=
0
;
}
static
int
pcwd_proc_get_info
(
char
*
buffer
,
char
**
start
,
off_t
offset
,
int
length
,
int
inout
)
{
int
len
;
off_t
begin
=
0
;
revision
=
get_revision
();
len
=
sprintf
(
buffer
,
"Version = "
WD_VER
"
\n
"
);
if
(
revision
==
PCWD_REVISION_A
)
len
+=
sprintf
(
buffer
+
len
,
"Revision = A
\n
"
);
else
len
+=
sprintf
(
buffer
+
len
,
"Revision = C
\n
"
);
if
(
supports_temp
)
{
unsigned
short
c
=
inb
(
current_readport
);
len
+=
sprintf
(
buffer
+
len
,
"Temp = Yes
\n
"
"Current temp = %d (Celsius)
\n
"
,
c
);
}
else
len
+=
sprintf
(
buffer
+
len
,
"Temp = No
\n
"
);
*
start
=
buffer
+
(
offset
);
len
-=
offset
;
if
(
len
>
length
)
len
=
length
;
return
len
;
}
static
struct
file_operations
pcwd_fops
=
{
read:
pcwd_read
,
write:
pcwd_write
,
...
...
drivers/char/ppdev.c
View file @
96d333c6
...
...
@@ -537,7 +537,7 @@ static int pp_release (struct inode * inode, struct file * file)
unsigned
int
minor
=
MINOR
(
inode
->
i_rdev
);
struct
pp_struct
*
pp
=
file
->
private_data
;
if
(
pp
->
pdev
->
port
->
ieee1284
.
mode
!=
IEEE1284_MODE_COMPAT
)
{
if
(
pp
->
pdev
&&
pp
->
pdev
->
port
->
ieee1284
.
mode
!=
IEEE1284_MODE_COMPAT
)
{
if
(
!
(
pp
->
flags
&
PP_CLAIMED
))
{
parport_claim_or_block
(
pp
->
pdev
);
pp
->
flags
|=
PP_CLAIMED
;
...
...
drivers/ide/ide-disk.c
View file @
96d333c6
...
...
@@ -813,14 +813,18 @@ static void idedisk_setup (ide_drive_t *drive)
(
!
drive
->
forced_geom
)
&&
drive
->
bios_sect
&&
drive
->
bios_head
)
drive
->
bios_cyl
=
(
capacity
/
drive
->
bios_sect
)
/
drive
->
bios_head
;
#if 0 /* done instead for entire identify block in arch/ide.h stuff */
/* fix byte-ordering of buffer size field */
id->buf_size = le16_to_cpu(id->buf_size);
#endif
printk
(
KERN_INFO
"%s: %.40s, %ldMB w/%dkB Cache, CHS=%d/%d/%d"
,
drive
->
name
,
id
->
model
,
capacity
/
2048L
,
id
->
buf_size
/
2
,
drive
->
bios_cyl
,
drive
->
bios_head
,
drive
->
bios_sect
);
printk
(
KERN_INFO
"%s: %ld sectors"
,
drive
->
name
,
capacity
);
/* Give size in megabytes (MB), not mebibytes (MiB). */
/* We compute the exact rounded value, avoiding overflow. */
printk
(
" (%ld MB)"
,
(
capacity
-
capacity
/
625
+
974
)
/
1950
);
/* Only print cache size when it was specified */
if
(
id
->
buf_size
)
printk
(
" w/%dKiB Cache"
,
id
->
buf_size
/
2
);
printk
(
", CHS=%d/%d/%d"
,
drive
->
bios_cyl
,
drive
->
bios_head
,
drive
->
bios_sect
);
#ifdef CONFIG_BLK_DEV_IDEDMA
if
(
drive
->
using_dma
)
(
void
)
HWIF
(
drive
)
->
dmaproc
(
ide_dma_verbose
,
drive
);
...
...
drivers/ide/ide.c
View file @
96d333c6
...
...
@@ -1662,6 +1662,7 @@ void ide_init_drive_cmd (struct request *rq)
rq
->
cmd
=
IDE_DRIVE_CMD
;
rq
->
sector
=
0
;
rq
->
nr_sectors
=
0
;
rq
->
nr_segments
=
0
;
rq
->
current_nr_sectors
=
0
;
rq
->
sem
=
NULL
;
rq
->
bh
=
NULL
;
...
...
drivers/net/wan/cycx_drv.c
View file @
96d333c6
...
...
@@ -48,14 +48,8 @@
* Aug 8, 1998 acme Initial version.
*/
#ifdef MODULE
#ifdef MODVERSIONS
#include <linux/modversions.h>
#endif
#include <linux/init.h>
/* __init */
#include <linux/module.h>
#else
#define EXPORT_SYMBOL(function)
#endif
#include <linux/kernel.h>
/* printk(), and other useful stuff */
#include <linux/stddef.h>
/* offsetof(), etc. */
#include <linux/errno.h>
/* return codes */
...
...
@@ -66,12 +60,10 @@
#include <asm/io.h>
/* read[wl], write[wl], ioremap, iounmap */
#define MOD_VERSION 0
#define MOD_RELEASE
5
#define MOD_RELEASE
6
#ifdef MODULE
MODULE_AUTHOR
(
"Arnaldo Carvalho de Melo"
);
MODULE_DESCRIPTION
(
"Cyclom 2x Sync Card Driver"
);
#endif
/* Function Prototypes */
/* Module entry points. These are called by the OS and must be public. */
...
...
@@ -129,20 +121,21 @@ static u32 cycx_2x_irq_options[] = { 7, 3, 5, 9, 10, 11, 12, 15 };
* Return: 0 Ok
* < 0 error.
* Context: process */
#ifdef MODULE
int
init_module
(
void
)
int
__init
cycx_drv_init
(
void
)
{
printk
(
KERN_INFO
"%s v%u.%u %s
\n
"
,
fullname
,
MOD_VERSION
,
MOD_RELEASE
,
copyright
);
return
0
;
}
/* Module 'remove' entry point.
* o release all remaining system resources */
void
c
leanup_module
(
void
)
void
c
ycx_drv_cleanup
(
void
)
{
}
#endif
/* Kernel APIs */
/* Set up adapter.
* o detect adapter type
...
...
@@ -599,4 +592,8 @@ static u16 checksum(u8 *buf, u32 len)
return
crc
;
}
module_init
(
cycx_drv_init
);
module_exit
(
cycx_drv_cleanup
);
/* End */
drivers/net/wan/cycx_main.c
View file @
96d333c6
...
...
@@ -13,6 +13,8 @@
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
* ============================================================================
* 2000/04/02 acme dprintk and cycx_debug
* module_init/module_exit
* 2000/01/21 acme rename cyclomx_open to cyclomx_mod_inc_use_count
* and cyclomx_close to cyclomx_mod_dec_use_count
* 2000/01/08 acme cleanup
...
...
@@ -43,15 +45,21 @@
#include <asm/uaccess.h>
/* kernel <-> user copy */
#include <linux/init.h>
/* __init (when not using as a module) */
/* Debug */
unsigned
int
cycx_debug
=
0
;
#ifdef MODULE
MODULE_AUTHOR
(
"Arnaldo Carvalho de Melo"
);
MODULE_DESCRIPTION
(
"Cyclom 2X Sync Card Driver."
);
MODULE_PARM
(
debug
,
"i"
);
MODULE_PARM_DESC
(
debug
,
"cyclomx debug level"
);
#endif
/* Defines & Macros */
#define DRV_VERSION 0
/* version number */
#define DRV_RELEASE
6
/* release (minor version) number */
#define DRV_RELEASE
7
/* release (minor version) number */
#define MAX_CARDS 1
/* max number of adapters */
#ifndef CONFIG_CYCLOMX_CARDS
/* configurable option */
...
...
@@ -60,10 +68,6 @@ MODULE_DESCRIPTION("Cyclom 2X Sync Card Driver.");
/* Function Prototypes */
/* Module entry points */
int
init_module
(
void
);
void
cleanup_module
(
void
);
/* WAN link driver entry points */
static
int
setup
(
wan_device_t
*
wandev
,
wandev_conf_t
*
conf
);
static
int
shutdown
(
wan_device_t
*
wandev
);
...
...
@@ -98,11 +102,7 @@ static cycx_t *card_array = NULL; /* adapter data space */
* < 0 error.
* Context: process
*/
#ifdef MODULE
int
init_module
(
void
)
#else
int
__init
cyclomx_init
(
void
)
#endif
{
int
cnt
,
err
=
0
;
...
...
@@ -156,8 +156,7 @@ int __init cyclomx_init (void)
* o unregister all adapters from the WAN router
* o release all remaining system resources
*/
#ifdef MODULE
void
cleanup_module
(
void
)
void
cyclomx_cleanup
(
void
)
{
int
i
=
0
;
...
...
@@ -168,7 +167,7 @@ void cleanup_module (void)
kfree
(
card_array
);
}
#endif
/* WAN Device Driver Entry Points */
/*
* Setup/configure WAN link driver.
...
...
@@ -385,4 +384,7 @@ void cyclomx_set_state (cycx_t *card, int state)
spin_unlock_irqrestore
(
&
card
->
lock
,
host_cpu_flags
);
}
module_init
(
cyclomx_init
);
module_exit
(
cyclomx_cleanup
);
/* End */
drivers/net/wan/cycx_x25.c
View file @
96d333c6
...
...
@@ -12,6 +12,10 @@
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
* ============================================================================
* 2000/04/02 acme dprintk, cycx_debug
* fixed the bug introduced in get_dev_by_lcn and
* get_dev_by_dte_addr by the anonymous hacker
* that converted this driver to softnet
* 2000/01/08 acme cleanup
* 1999/10/27 acme use ARPHRD_HWX25 so that the X.25 stack know
* that we have a X.25 stack implemented in
...
...
@@ -110,7 +114,7 @@ typedef struct x25_channel {
u32
idle_tmout
;
/* sec, before disconnecting */
struct
sk_buff
*
rx_skb
;
/* receive socket buffer */
cycx_t
*
card
;
/* -> owner */
struct
enet_statistics
ifstats
;
/* interface statistics */
struct
net_device_stats
ifstats
;
/* interface statistics */
}
x25_channel_t
;
/* Function Prototypes */
...
...
@@ -178,13 +182,11 @@ static void hex_dump(char *msg, unsigned char *p, int len);
static
void
x25_dump_config
(
TX25Config
*
conf
);
static
void
x25_dump_stats
(
TX25Stats
*
stats
);
static
void
x25_dump_devs
(
wan_device_t
*
wandev
);
#define dprintk(format, a...) printk(format, ##a)
#else
#define hex_dump(msg, p, len)
#define x25_dump_config(conf)
#define x25_dump_stats(stats)
#define x25_dump_devs(wandev)
#define dprintk(format, a...)
#endif
/* Public Functions */
...
...
@@ -846,7 +848,7 @@ static void connect_intr (cycx_t *card, TX25Cmd *cmd)
if
(
sizerem
)
nibble_to_byte
(
d
+
(
sizeloc
>>
1
),
rem
,
sizerem
,
sizeloc
&
1
);
dprintk
(
KERN_INFO
"connect_intr:lcn=%d, local=%s, remote=%s
\n
"
,
dprintk
(
1
,
KERN_INFO
"connect_intr:lcn=%d, local=%s, remote=%s
\n
"
,
lcn
,
loc
,
rem
);
if
((
dev
=
get_dev_by_dte_addr
(
wandev
,
rem
))
==
NULL
)
{
...
...
@@ -872,7 +874,7 @@ static void connect_confirm_intr (cycx_t *card, TX25Cmd *cmd)
cycx_peek
(
&
card
->
hw
,
cmd
->
buf
,
&
lcn
,
sizeof
(
lcn
));
cycx_peek
(
&
card
->
hw
,
cmd
->
buf
+
1
,
&
key
,
sizeof
(
key
));
dprintk
(
KERN_INFO
"%s: connect_confirm_intr:lcn=%d, key=%d
\n
"
,
dprintk
(
1
,
KERN_INFO
"%s: connect_confirm_intr:lcn=%d, key=%d
\n
"
,
card
->
devname
,
lcn
,
key
);
if
((
dev
=
get_dev_by_lcn
(
wandev
,
-
key
))
==
NULL
)
{
...
...
@@ -897,7 +899,7 @@ static void disconnect_confirm_intr (cycx_t *card, TX25Cmd *cmd)
u8
lcn
;
cycx_peek
(
&
card
->
hw
,
cmd
->
buf
,
&
lcn
,
sizeof
(
lcn
));
dprintk
(
KERN_INFO
"%s: disconnect_confirm_intr:lcn=%d
\n
"
,
dprintk
(
1
,
KERN_INFO
"%s: disconnect_confirm_intr:lcn=%d
\n
"
,
card
->
devname
,
lcn
);
if
((
dev
=
get_dev_by_lcn
(
wandev
,
lcn
))
==
NULL
)
{
/* Invalid channel, discard packet */
...
...
@@ -917,7 +919,7 @@ static void disconnect_intr (cycx_t *card, TX25Cmd *cmd)
u8
lcn
;
cycx_peek
(
&
card
->
hw
,
cmd
->
buf
,
&
lcn
,
sizeof
(
lcn
));
dprintk
(
KERN_INFO
"disconnect_intr:lcn=%d
\n
"
,
lcn
);
dprintk
(
1
,
KERN_INFO
"disconnect_intr:lcn=%d
\n
"
,
lcn
);
if
((
dev
=
get_dev_by_lcn
(
wandev
,
lcn
))
!=
NULL
)
{
x25_channel_t
*
chan
=
dev
->
priv
;
...
...
@@ -1172,7 +1174,7 @@ static int x25_place_call (cycx_t *card, x25_channel_t *chan)
key
=
ffz
(
card
->
u
.
x
.
connection_keys
);
set_bit
(
key
,
(
void
*
)
&
card
->
u
.
x
.
connection_keys
);
++
key
;
dprintk
(
KERN_INFO
"%s:x25_place_call:key=%d
\n
"
,
card
->
devname
,
key
);
dprintk
(
1
,
KERN_INFO
"%s:x25_place_call:key=%d
\n
"
,
card
->
devname
,
key
);
memset
(
d
,
0
,
sizeof
(
d
));
d
[
1
]
=
key
;
/* user key */
d
[
2
]
=
0x10
;
...
...
@@ -1259,6 +1261,8 @@ static struct net_device *get_dev_by_lcn (wan_device_t *wandev, s16 lcn)
x25_channel_t
*
chan
;
while
(
dev
)
{
chan
=
(
x25_channel_t
*
)
dev
->
priv
;
if
(
chan
->
lcn
==
lcn
)
break
;
dev
=
chan
->
slave
;
...
...
@@ -1273,6 +1277,8 @@ static struct net_device *get_dev_by_dte_addr (wan_device_t *wandev, char *dte)
x25_channel_t
*
chan
;
while
(
dev
)
{
chan
=
(
x25_channel_t
*
)
dev
->
priv
;
if
(
!
strcmp
(
chan
->
addr
,
dte
))
break
;
dev
=
chan
->
slave
;
...
...
@@ -1296,7 +1302,7 @@ static int chan_connect (struct net_device *dev)
if
(
!
chan
->
addr
[
0
])
return
-
EINVAL
;
/* no destination address */
dprintk
(
KERN_INFO
"%s: placing X.25 call to %s...
\n
"
,
dprintk
(
1
,
KERN_INFO
"%s: placing X.25 call to %s...
\n
"
,
card
->
devname
,
chan
->
addr
);
if
(
x25_place_call
(
card
,
chan
))
...
...
drivers/parport/share.c
View file @
96d333c6
This diff is collapsed.
Click to expand it.
fs/autofs4/expire.c
View file @
96d333c6
...
...
@@ -47,8 +47,7 @@ static int is_tree_busy(struct dentry *root)
}
/* Mountpoints don't count */
if
(
root
->
d_mounts
!=
root
||
root
->
d_covers
!=
root
)
{
if
(
d_mountpoint
(
root
))
{
DPRINTK
((
"is_tree_busy: mountpoint
\n
"
));
count
--
;
}
...
...
@@ -77,8 +76,7 @@ static int is_tree_busy(struct dentry *root)
count
+=
(
dentry
->
d_count
-
1
);
/* Mountpoints don't count */
if
(
dentry
->
d_mounts
!=
dentry
||
dentry
->
d_covers
!=
dentry
)
{
if
(
d_mountpoint
(
dentry
))
{
DPRINTK
((
"is_tree_busy: mountpoint
\n
"
));
adj
++
;
}
...
...
fs/autofs4/symlink.c
View file @
96d333c6
...
...
@@ -21,7 +21,7 @@ static int autofs4_readlink(struct dentry *dentry, char *buffer, int buflen)
static
struct
dentry
*
autofs4_follow_link
(
struct
dentry
*
dentry
,
struct
dentry
*
base
,
struct
vfsmount
*
mnt
,
struct
vfsmount
*
*
mnt
,
unsigned
int
flags
)
{
struct
autofs_info
*
ino
=
autofs4_dentry_ino
(
dentry
);
...
...
fs/dquot.c
View file @
96d333c6
...
...
@@ -716,15 +716,16 @@ int remove_inode_dquot_ref(struct inode *inode, short type, struct list_head *to
}
inode
->
i_flags
&=
~
S_QUOTA
;
put_it:
if
(
dquot
!=
NODQUOT
)
if
(
dquot
!=
NODQUOT
)
{
if
(
dqput_blocks
(
dquot
))
{
if
(
dquot
->
dq_count
!=
1
)
printk
(
KERN_WARNING
"VFS: Adding dquot with dq_count %d to dispose list.
\n
"
,
dquot
->
dq_count
);
list_add
(
&
dquot
->
dq_free
,
tofree_head
);
/* As dquot must have currently users it can't be on the free list... */
return
1
;
}
else
}
else
{
dqput
(
dquot
);
/* We have guaranteed we won't block */
}
}
return
0
;
}
...
...
fs/lockd/clntproc.c
View file @
96d333c6
...
...
@@ -517,24 +517,22 @@ nlmclnt_unlock_callback(struct rpc_task *task)
if
(
RPC_ASSASSINATED
(
task
))
goto
die
;
#if 0
/* FIXME: rpc_restart_call() is broken! */
if
(
task
->
tk_status
<
0
)
{
dprintk
(
"lockd: unlock failed (err = %d)
\n
"
,
-
task
->
tk_status
);
nlm_rebind_host(req->a_host);
rpc_restart_call(task);
return;
goto
retry_unlock
;
}
#endif
if
(
status
!=
NLM_LCK_GRANTED
&&
status
!=
NLM_LCK_DENIED_GRACE_PERIOD
)
{
printk
(
"lockd: unexpected unlock status: %d
\n
"
,
status
);
}
die:
rpc_release_task
(
task
);
nlm_release_host
(
req
->
a_host
);
kfree
(
req
);
return
;
retry_unlock:
nlm_rebind_host
(
req
->
a_host
);
rpc_restart_call
(
task
);
}
/*
...
...
@@ -609,20 +607,14 @@ nlmclnt_cancel_callback(struct rpc_task *task)
}
die:
retry_cancel:
rpc_release_task
(
task
);
nlm_release_host
(
req
->
a_host
);
kfree
(
req
);
return
;
#if 0
/* FIXME: rpc_restart_call() is broken */
retry_cancel:
nlm_rebind_host
(
req
->
a_host
);
rpc_restart_call
(
task
);
rpc_delay
(
task
,
30
*
HZ
);
return;
#endif
}
/*
...
...
fs/lockd/svc4proc.c
View file @
96d333c6
...
...
@@ -497,7 +497,6 @@ nlm4svc_callback_exit(struct rpc_task *task)
dprintk
(
"lockd: %4d callback failed (errno = %d)
\n
"
,
task
->
tk_pid
,
-
task
->
tk_status
);
}
rpc_release_task
(
task
);
nlm_release_host
(
call
->
a_host
);
kfree
(
call
);
}
...
...
fs/lockd/svclock.c
View file @
96d333c6
...
...
@@ -579,7 +579,6 @@ nlmsvc_grant_callback(struct rpc_task *task)
block
->
b_incall
=
0
;
nlm_release_host
(
call
->
a_host
);
rpc_release_task
(
task
);
}
/*
...
...
fs/lockd/svcproc.c
View file @
96d333c6
...
...
@@ -523,7 +523,6 @@ nlmsvc_callback_exit(struct rpc_task *task)
task
->
tk_pid
,
-
task
->
tk_status
);
}
nlm_release_host
(
call
->
a_host
);
rpc_release_task
(
task
);
kfree
(
call
);
}
...
...
fs/nfs/flushd.c
View file @
96d333c6
...
...
@@ -299,6 +299,5 @@ nfs_flushd_exit(struct rpc_task *task)
cache
->
task
=
NULL
;
spin_unlock
(
&
nfs_flushd_lock
);
wake_up
(
&
cache
->
request_wait
);
rpc_release_task
(
task
);
}
fs/nfs/read.c
View file @
96d333c6
...
...
@@ -168,7 +168,6 @@ nfs_readpage_result(struct rpc_task *task)
UnlockPage
(
page
);
page_cache_release
(
page
);
rpc_release_task
(
task
);
kfree
(
req
);
}
...
...
fs/nfs/write.c
View file @
96d333c6
...
...
@@ -161,7 +161,6 @@ static __inline__ void nfs_writedata_free(struct nfs_write_data *p)
static
void
nfs_writedata_release
(
struct
rpc_task
*
task
)
{
struct
nfs_write_data
*
wdata
=
(
struct
nfs_write_data
*
)
task
->
tk_calldata
;
rpc_release_task
(
task
);
nfs_writedata_free
(
wdata
);
}
...
...
@@ -1159,6 +1158,8 @@ nfs_flush_one(struct list_head *head, struct file *file, int how)
/* Finalize the task. */
rpc_init_task
(
task
,
clnt
,
nfs_writeback_done
,
flags
);
task
->
tk_calldata
=
data
;
/* Release requests */
task
->
tk_release
=
nfs_writedata_release
;
#ifdef CONFIG_NFS_V3
msg
.
rpc_proc
=
(
NFS_PROTO
(
inode
)
->
version
==
3
)
?
NFS3PROC_WRITE
:
NFSPROC_WRITE
;
...
...
@@ -1307,7 +1308,6 @@ nfs_writeback_done(struct rpc_task *task)
next:
nfs_unlock_request
(
req
);
}
nfs_writedata_release
(
task
);
}
...
...
@@ -1388,6 +1388,8 @@ nfs_commit_list(struct list_head *head, int how)
rpc_init_task
(
task
,
clnt
,
nfs_commit_done
,
flags
);
task
->
tk_calldata
=
data
;
/* Release requests */
task
->
tk_release
=
nfs_writedata_release
;
msg
.
rpc_proc
=
NFS3PROC_COMMIT
;
msg
.
rpc_argp
=
&
data
->
args
;
...
...
@@ -1456,7 +1458,6 @@ nfs_commit_done(struct rpc_task *task)
next:
nfs_unlock_request
(
req
);
}
nfs_writedata_release
(
task
);
}
#endif
...
...
fs/open.c
View file @
96d333c6
...
...
@@ -343,7 +343,7 @@ asmlinkage long sys_chdir(const char * filename)
if
(
IS_ERR
(
name
))
goto
out
;
dentry
=
lookup_dentry
(
name
,
NULL
,
0
);
dentry
=
lookup_dentry
(
name
,
NULL
,
LOOKUP_FOLLOW
);
putname
(
name
);
error
=
PTR_ERR
(
dentry
);
if
(
IS_ERR
(
dentry
))
...
...
@@ -432,7 +432,7 @@ asmlinkage long sys_chroot(const char * filename)
if
(
IS_ERR
(
name
))
goto
out
;
dentry
=
lookup_dentry
(
name
,
NULL
,
0
);
dentry
=
lookup_dentry
(
name
,
NULL
,
LOOKUP_FOLLOW
);
putname
(
name
);
error
=
PTR_ERR
(
dentry
);
if
(
IS_ERR
(
dentry
))
...
...
@@ -703,7 +703,7 @@ struct file *dentry_open(struct dentry *dentry, struct vfsmount *mnt, int flags)
if
(
f
->
f_mode
&
FMODE_WRITE
)
{
error
=
get_write_access
(
inode
);
if
(
error
)
goto
cleanup_
dentry
;
goto
cleanup_
file
;
}
f
->
f_dentry
=
dentry
;
...
...
@@ -727,10 +727,11 @@ struct file *dentry_open(struct dentry *dentry, struct vfsmount *mnt, int flags)
put_write_access
(
inode
);
f
->
f_dentry
=
NULL
;
f
->
f_vfsmnt
=
NULL
;
cleanup_file:
put_filp
(
f
);
cleanup_dentry:
dput
(
dentry
);
mntput
(
mnt
);
put_filp
(
f
);
return
ERR_PTR
(
error
);
}
...
...
include/linux/blkdev.h
View file @
96d333c6
...
...
@@ -32,6 +32,7 @@ struct request {
int
errors
;
unsigned
long
sector
;
unsigned
long
nr_sectors
;
unsigned
long
hard_sector
,
hard_nr_sectors
;
unsigned
int
nr_segments
;
unsigned
int
nr_hw_segments
;
unsigned
long
current_nr_sectors
;
...
...
include/linux/cycx_x25.h
View file @
96d333c6
...
...
@@ -12,6 +12,7 @@
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
* ============================================================================
* 2000/04/02 acme dprintk and cycx_debug
* 1999/01/03 acme judicious use of data types
* 1999/01/02 acme #define X25_ACK_N3 0x4411
* 1998/12/28 acme cleanup: lot'o'things removed
...
...
@@ -30,6 +31,11 @@
#define X25_MBOX_OFFS 0x300
/* general mailbox block */
#define X25_RXMBOX_OFFS 0x340
/* receive mailbox */
/* Debug */
#define dprintk(level, format, a...) if (cycx_debug >= level) printk(format, ##a)
extern
unsigned
int
cycx_debug
;
/* Data Structures */
/* X.25 Command Block. */
typedef
struct
X25Cmd
...
...
include/linux/fs.h
View file @
96d333c6
...
...
@@ -1015,7 +1015,7 @@ extern struct dentry * lookup_dentry(const char *, struct dentry *, unsigned int
extern
struct
dentry
*
lookup_one
(
const
char
*
,
struct
dentry
*
);
extern
struct
dentry
*
__namei
(
const
char
*
,
unsigned
int
);
#define namei(pathname) __namei(pathname,
1
)
#define namei(pathname) __namei(pathname,
LOOKUP_FOLLOW
)
#define lnamei(pathname) __namei(pathname, 0)
extern
void
iput
(
struct
inode
*
);
...
...
include/linux/mm.h
View file @
96d333c6
...
...
@@ -180,7 +180,7 @@ typedef struct page {
#define Page_Uptodate(page) test_bit(PG_uptodate, &(page)->flags)
#define SetPageUptodate(page) set_bit(PG_uptodate, &(page)->flags)
#define ClearPageUptodate(page) clear_bit(PG_uptodate, &(page)->flags)
#define Page
_Dirty(page)
test_bit(PG_dirty, &(page)->flags)
#define Page
Dirty(page)
test_bit(PG_dirty, &(page)->flags)
#define SetPageDirty(page) set_bit(PG_dirty, &(page)->flags)
#define PageLocked(page) test_bit(PG_locked, &(page)->flags)
#define LockPage(page) set_bit(PG_locked, &(page)->flags)
...
...
@@ -207,6 +207,9 @@ typedef struct page {
#define PageClearSwapCache(page) clear_bit(PG_swap_cache, &(page)->flags)
#define PageTestandClearSwapCache(page) test_and_clear_bit(PG_swap_cache, &(page)->flags)
#define PageSwapEntry(page) test_bit(PG_swap_entry, &(page)->flags)
#define SetPageSwapEntry(page) set_bit(PG_swap_entry, &(page)->flags)
#define ClearPageSwapEntry(page) clear_bit(PG_swap_entry, &(page)->flags)
#ifdef CONFIG_HIGHMEM
#define PageHighMem(page) test_bit(PG_highmem, &(page)->flags)
...
...
include/linux/sunrpc/sched.h
View file @
96d333c6
...
...
@@ -63,6 +63,7 @@ struct rpc_task {
void
(
*
tk_callback
)(
struct
rpc_task
*
);
void
(
*
tk_action
)(
struct
rpc_task
*
);
void
(
*
tk_exit
)(
struct
rpc_task
*
);
void
(
*
tk_release
)(
struct
rpc_task
*
);
void
*
tk_calldata
;
/*
...
...
mm/filemap.c
View file @
96d333c6
...
...
@@ -305,7 +305,7 @@ int shrink_mmap(int priority, int gfp_mask, zone_t *zone)
/* is it a page-cache page? */
if
(
page
->
mapping
)
{
if
(
!
Page
_
Dirty
(
page
)
&&
!
pgcache_under_min
())
{
if
(
!
PageDirty
(
page
)
&&
!
pgcache_under_min
())
{
remove_page_from_inode_queue
(
page
);
remove_page_from_hash_queue
(
page
);
page
->
mapping
=
NULL
;
...
...
@@ -467,7 +467,7 @@ static inline void __add_to_page_cache(struct page * page,
struct
page
*
alias
;
unsigned
long
flags
;
flags
=
page
->
flags
&
~
((
1
<<
PG_uptodate
)
|
(
1
<<
PG_error
));
flags
=
page
->
flags
&
~
((
1
<<
PG_uptodate
)
|
(
1
<<
PG_error
)
|
(
1
<<
PG_dirty
)
);
page
->
flags
=
flags
|
(
1
<<
PG_locked
)
|
(
1
<<
PG_referenced
);
get_page
(
page
);
page
->
index
=
offset
;
...
...
mm/memory.c
View file @
96d333c6
...
...
@@ -1053,7 +1053,7 @@ static int do_swap_page(struct task_struct * tsk,
pte
=
mk_pte
(
page
,
vma
->
vm_page_prot
);
set_bit
(
PG_swap_entry
,
&
page
->
flags
);
SetPageSwapEntry
(
page
);
/*
* Freeze the "shared"ness of the page, ie page_count + swap_count.
...
...
mm/page_alloc.c
View file @
96d333c6
...
...
@@ -108,6 +108,8 @@ void __free_pages_ok (struct page *page, unsigned long order)
BUG
();
if
(
PageLocked
(
page
))
BUG
();
if
(
PageDecrAfter
(
page
))
BUG
();
zone
=
page
->
zone
;
...
...
mm/swap_state.c
View file @
96d333c6
...
...
@@ -88,6 +88,9 @@ void __delete_from_swap_cache(struct page *page)
*/
void
delete_from_swap_cache_nolock
(
struct
page
*
page
)
{
if
(
!
PageLocked
(
page
))
BUG
();
if
(
block_flushpage
(
page
,
0
))
lru_cache_del
(
page
);
...
...
@@ -122,8 +125,8 @@ void free_page_and_swap_cache(struct page *page)
}
UnlockPage
(
page
);
}
clear_bit
(
PG_swap_entry
,
&
page
->
flags
);
ClearPageSwapEntry
(
page
);
__free_page
(
page
);
}
...
...
mm/swapfile.c
View file @
96d333c6
...
...
@@ -207,7 +207,7 @@ swp_entry_t acquire_swap_entry(struct page *page)
unsigned
long
offset
,
type
;
swp_entry_t
entry
;
if
(
!
test_bit
(
PG_swap_entry
,
&
page
->
flags
))
if
(
!
PageSwapEntry
(
page
))
goto
new_swap_entry
;
/* We have the old entry in the page offset still */
...
...
net/sunrpc/clnt.c
View file @
96d333c6
...
...
@@ -201,7 +201,6 @@ rpc_release_client(struct rpc_clnt *clnt)
static
void
rpc_default_callback
(
struct
rpc_task
*
task
)
{
rpc_release_task
(
task
);
}
/*
...
...
@@ -266,9 +265,10 @@ int rpc_call_sync(struct rpc_clnt *clnt, struct rpc_message *msg, int flags)
/* Set up the call info struct and execute the task */
if
(
task
->
tk_status
==
0
)
status
=
rpc_execute
(
task
);
else
else
{
status
=
task
->
tk_status
;
rpc_release_task
(
task
);
rpc_release_task
(
task
);
}
rpc_clnt_sigunmask
(
clnt
,
&
oldset
);
...
...
@@ -347,10 +347,9 @@ rpc_call_setup(struct rpc_task *task, struct rpc_message *msg, int flags)
void
rpc_restart_call
(
struct
rpc_task
*
task
)
{
if
(
task
->
tk_flags
&
RPC_TASK_KILLED
)
{
rpc_release_task
(
task
);
if
(
RPC_ASSASSINATED
(
task
))
return
;
}
task
->
tk_action
=
call_reserve
;
rpcproc_count
(
task
->
tk_client
,
task
->
tk_msg
.
rpc_proc
)
++
;
}
...
...
net/sunrpc/sched.c
View file @
96d333c6
...
...
@@ -508,6 +508,7 @@ __rpc_execute(struct rpc_task *task)
return
0
;
}
restarted:
while
(
1
)
{
/*
* Execute any pending callback.
...
...
@@ -586,10 +587,29 @@ __rpc_execute(struct rpc_task *task)
}
}
if
(
task
->
tk_exit
)
{
task
->
tk_exit
(
task
);
/* If tk_action is non-null, the user wants us to restart */
if
(
task
->
tk_action
)
{
if
(
!
RPC_ASSASSINATED
(
task
))
{
/* Release RPC slot and buffer memory */
if
(
task
->
tk_rqstp
)
xprt_release
(
task
);
if
(
task
->
tk_buffer
)
{
rpc_free
(
task
->
tk_buffer
);
task
->
tk_buffer
=
NULL
;
}
goto
restarted
;
}
printk
(
KERN_ERR
"RPC: dead task tries to walk away.
\n
"
);
}
}
dprintk
(
"RPC: %4d exit() = %d
\n
"
,
task
->
tk_pid
,
task
->
tk_status
);
status
=
task
->
tk_status
;
if
(
task
->
tk_exit
)
task
->
tk_exit
(
task
);
/* Release all resources associated with the task */
rpc_release_task
(
task
);
return
status
;
}
...
...
@@ -599,22 +619,32 @@ __rpc_execute(struct rpc_task *task)
*
* This may be called recursively if e.g. an async NFS task updates
* the attributes and finds that dirty pages must be flushed.
* NOTE: Upon exit of this function the task is guaranteed to be
* released. In particular note that tk_release() will have
* been called, so your task memory may have been freed.
*/
int
rpc_execute
(
struct
rpc_task
*
task
)
{
int
status
=
-
EIO
;
if
(
rpc_inhibit
)
{
printk
(
KERN_INFO
"RPC: execution inhibited!
\n
"
);
return
-
EIO
;
goto
out_release
;
}
task
->
tk_flags
|=
RPC_TASK_RUNNING
;
status
=
-
EWOULDBLOCK
;
if
(
task
->
tk_active
)
{
printk
(
KERN_ERR
"RPC: active task was run twice!
\n
"
);
return
-
EWOULDBLOCK
;
goto
out_err
;
}
task
->
tk_active
=
1
;
task
->
tk_flags
|=
RPC_TASK_RUNNING
;
return
__rpc_execute
(
task
);
out_release:
rpc_release_task
(
task
);
out_err:
return
status
;
}
/*
...
...
@@ -758,6 +788,13 @@ rpc_init_task(struct rpc_task *task, struct rpc_clnt *clnt,
current
->
pid
);
}
static
void
rpc_default_free_task
(
struct
rpc_task
*
task
)
{
dprintk
(
"RPC: %4d freeing task
\n
"
,
task
->
tk_pid
);
rpc_free
(
task
);
}
/*
* Create a new task for the specified client. We have to
* clean up after an allocation failure, as the client may
...
...
@@ -774,6 +811,9 @@ rpc_new_task(struct rpc_clnt *clnt, rpc_action callback, int flags)
rpc_init_task
(
task
,
clnt
,
callback
,
flags
);
/* Replace tk_release */
task
->
tk_release
=
rpc_default_free_task
;
dprintk
(
"RPC: %4d allocated task
\n
"
,
task
->
tk_pid
);
task
->
tk_flags
|=
RPC_TASK_DYNAMIC
;
out:
...
...
@@ -849,12 +889,8 @@ rpc_release_task(struct rpc_task *task)
#ifdef RPC_DEBUG
task
->
tk_magic
=
0
;
#endif
if
(
task
->
tk_flags
&
RPC_TASK_DYNAMIC
)
{
dprintk
(
"RPC: %4d freeing task
\n
"
,
task
->
tk_pid
);
task
->
tk_flags
&=
~
RPC_TASK_DYNAMIC
;
rpc_free
(
task
);
}
if
(
task
->
tk_release
)
task
->
tk_release
(
task
);
}
/*
...
...
@@ -886,7 +922,6 @@ rpc_child_exit(struct rpc_task *child)
__rpc_wake_up
(
parent
);
}
spin_unlock_bh
(
&
rpc_queue_lock
);
rpc_release_task
(
child
);
}
/*
...
...
net/sunrpc/sunrpc_syms.c
View file @
96d333c6
...
...
@@ -27,7 +27,6 @@ EXPORT_SYMBOL(rpc_allocate);
EXPORT_SYMBOL
(
rpc_free
);
EXPORT_SYMBOL
(
rpc_execute
);
EXPORT_SYMBOL
(
rpc_init_task
);
EXPORT_SYMBOL
(
rpc_release_task
);
EXPORT_SYMBOL
(
rpc_sleep_on
);
EXPORT_SYMBOL
(
rpc_wake_up_next
);
EXPORT_SYMBOL
(
rpc_wake_up_task
);
...
...
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