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
a66bce5b
Commit
a66bce5b
authored
Feb 13, 2003
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge
http://linux-acpi.bkbits.net/linux-acpi
into home.transmeta.com:/home/torvalds/v2.5/linux
parents
1f16d185
cd5d9d66
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
80 additions
and
32 deletions
+80
-32
arch/i386/kernel/ptrace.c
arch/i386/kernel/ptrace.c
+3
-5
fs/nfs/inode.c
fs/nfs/inode.c
+1
-0
include/linux/sunrpc/clnt.h
include/linux/sunrpc/clnt.h
+1
-0
kernel/ptrace.c
kernel/ptrace.c
+5
-0
net/sunrpc/clnt.c
net/sunrpc/clnt.c
+28
-7
net/sunrpc/rpc_pipe.c
net/sunrpc/rpc_pipe.c
+18
-12
net/sunrpc/xprt.c
net/sunrpc/xprt.c
+24
-8
No files found.
arch/i386/kernel/ptrace.c
View file @
a66bce5b
...
...
@@ -530,11 +530,9 @@ void do_syscall_trace(struct pt_regs *regs, int entryexit)
return
;
/* the 0x80 provides a way for the tracing parent to distinguish
between a syscall stop and SIGTRAP delivery */
current
->
exit_code
=
SIGTRAP
|
((
current
->
ptrace
&
PT_TRACESYSGOOD
)
?
0x80
:
0
);
current
->
state
=
TASK_STOPPED
;
notify_parent
(
current
,
SIGCHLD
);
schedule
();
ptrace_notify
(
SIGTRAP
|
((
current
->
ptrace
&
PT_TRACESYSGOOD
)
?
0x80
:
0
));
/*
* this isn't the same as continuing with a signal, but it will do
* for normal use. strace only continues with a signal if the
...
...
fs/nfs/inode.c
View file @
a66bce5b
...
...
@@ -93,6 +93,7 @@ struct rpc_program nfs_program = {
.
nrvers
=
sizeof
(
nfs_version
)
/
sizeof
(
nfs_version
[
0
]),
.
version
=
nfs_version
,
.
stats
=
&
nfs_rpcstat
,
.
pipe_dir_name
=
"/nfs"
,
};
static
inline
unsigned
long
...
...
include/linux/sunrpc/clnt.h
View file @
a66bce5b
...
...
@@ -79,6 +79,7 @@ struct rpc_program {
unsigned
int
nrvers
;
/* number of versions */
struct
rpc_version
**
version
;
/* version array */
struct
rpc_stat
*
stats
;
/* statistics */
char
*
pipe_dir_name
;
/* path to rpc_pipefs dir */
};
struct
rpc_version
{
...
...
kernel/ptrace.c
View file @
a66bce5b
...
...
@@ -351,4 +351,9 @@ void ptrace_notify(int exit_code)
set_current_state
(
TASK_STOPPED
);
notify_parent
(
current
,
SIGCHLD
);
schedule
();
/*
* Signals sent while we were stopped might set TIF_SIGPENDING.
*/
recalc_sigpending
();
}
net/sunrpc/clnt.c
View file @
a66bce5b
...
...
@@ -63,6 +63,32 @@ static u32 * call_header(struct rpc_task *task);
static
u32
*
call_verify
(
struct
rpc_task
*
task
);
static
int
rpc_setup_pipedir
(
struct
rpc_clnt
*
clnt
,
char
*
dir_name
)
{
static
uint32_t
clntid
;
int
maxlen
=
sizeof
(
clnt
->
cl_pathname
);
int
error
;
if
(
dir_name
==
NULL
)
return
0
;
for
(;;)
{
snprintf
(
clnt
->
cl_pathname
,
sizeof
(
clnt
->
cl_pathname
),
"%s/clnt%x"
,
dir_name
,
(
unsigned
int
)
clntid
++
);
clnt
->
cl_pathname
[
sizeof
(
clnt
->
cl_pathname
)
-
1
]
=
'\0'
;
clnt
->
cl_dentry
=
rpc_mkdir
(
clnt
->
cl_pathname
,
clnt
);
if
(
!
IS_ERR
(
clnt
->
cl_dentry
))
return
0
;
error
=
PTR_ERR
(
clnt
->
cl_dentry
);
if
(
error
!=
-
EEXIST
)
{
printk
(
KERN_INFO
"RPC: Couldn't create pipefs entry %s, error %d
\n
"
,
clnt
->
cl_pathname
,
error
);
return
error
;
}
}
}
/*
* Create an RPC client
* FIXME: This should also take a flags argument (as in task->tk_flags).
...
...
@@ -109,14 +135,9 @@ rpc_create_client(struct rpc_xprt *xprt, char *servname,
rpc_init_rtt
(
&
clnt
->
cl_rtt
,
xprt
->
timeout
.
to_initval
);
snprintf
(
clnt
->
cl_pathname
,
sizeof
(
clnt
->
cl_pathname
),
"/%s/clnt%p"
,
clnt
->
cl_protname
,
clnt
);
clnt
->
cl_dentry
=
rpc_mkdir
(
clnt
->
cl_pathname
,
clnt
);
if
(
IS_ERR
(
clnt
->
cl_dentry
))
{
printk
(
KERN_INFO
"RPC: Couldn't create pipefs entry %s
\n
"
,
clnt
->
cl_pathname
);
if
(
rpc_setup_pipedir
(
clnt
,
program
->
pipe_dir_name
)
<
0
)
goto
out_no_path
;
}
if
(
!
rpcauth_create
(
flavor
,
clnt
))
{
printk
(
KERN_INFO
"RPC: Couldn't create auth handle (flavor %u)
\n
"
,
flavor
);
...
...
net/sunrpc/rpc_pipe.c
View file @
a66bce5b
...
...
@@ -476,15 +476,16 @@ rpc_get_inode(struct super_block *sb, int mode)
* FIXME: This probably has races.
*/
static
void
rpc_depopulate
(
struct
dentry
*
dir
)
rpc_depopulate
(
struct
dentry
*
parent
)
{
struct
inode
*
dir
=
parent
->
d_inode
;
LIST_HEAD
(
head
);
struct
list_head
*
pos
,
*
next
;
struct
dentry
*
dentry
;
down
(
&
dir
->
d_inode
->
i_sem
);
down
(
&
dir
->
i_sem
);
spin_lock
(
&
dcache_lock
);
list_for_each_safe
(
pos
,
next
,
&
dir
->
d_subdirs
)
{
list_for_each_safe
(
pos
,
next
,
&
parent
->
d_subdirs
)
{
dentry
=
list_entry
(
pos
,
struct
dentry
,
d_child
);
if
(
!
d_unhashed
(
dentry
))
{
dget_locked
(
dentry
);
...
...
@@ -499,32 +500,34 @@ rpc_depopulate(struct dentry *dir)
__d_drop
(
dentry
);
if
(
dentry
->
d_inode
)
{
rpc_inode_setowner
(
dentry
->
d_inode
,
NULL
);
simple_unlink
(
dir
->
d_inode
,
dentry
);
simple_unlink
(
dir
,
dentry
);
}
dput
(
dentry
);
}
up
(
&
dir
->
d_inode
->
i_sem
);
up
(
&
dir
->
i_sem
);
}
static
int
rpc_populate
(
struct
dentry
*
dir
,
rpc_populate
(
struct
dentry
*
parent
,
struct
rpc_filelist
*
files
,
int
start
,
int
eof
)
{
void
*
private
=
RPC_I
(
dir
->
d_inode
)
->
private
;
struct
inode
*
inode
,
*
dir
=
parent
->
d_inode
;
void
*
private
=
RPC_I
(
dir
)
->
private
;
struct
qstr
name
;
struct
dentry
*
dentry
;
struct
inode
*
inode
;
int
mode
,
i
;
down
(
&
dir
->
i_sem
);
for
(
i
=
start
;
i
<
eof
;
i
++
)
{
name
.
name
=
files
[
i
].
name
;
name
.
len
=
strlen
(
name
.
name
);
name
.
hash
=
full_name_hash
(
name
.
name
,
name
.
len
);
dentry
=
d_alloc
(
dir
,
&
name
);
dentry
=
d_alloc
(
parent
,
&
name
);
if
(
!
dentry
)
goto
out_bad
;
mode
=
files
[
i
].
mode
;
inode
=
rpc_get_inode
(
dir
->
d_inode
->
i_sb
,
mode
);
inode
=
rpc_get_inode
(
dir
->
i_sb
,
mode
);
if
(
!
inode
)
{
dput
(
dentry
);
goto
out_bad
;
...
...
@@ -535,13 +538,15 @@ rpc_populate(struct dentry *dir,
if
(
private
)
rpc_inode_setowner
(
inode
,
private
);
if
(
S_ISDIR
(
mode
))
dir
->
d_inode
->
i_nlink
++
;
dir
->
i_nlink
++
;
d_add
(
dentry
,
inode
);
}
up
(
&
dir
->
i_sem
);
return
0
;
out_bad:
up
(
&
dir
->
i_sem
);
printk
(
KERN_WARNING
"%s: %s failed to populate directory %s
\n
"
,
__FILE__
,
__FUNCTION__
,
dir
->
d_name
.
name
);
__FILE__
,
__FUNCTION__
,
parent
->
d_name
.
name
);
return
-
ENOMEM
;
}
...
...
@@ -570,6 +575,7 @@ __rpc_rmdir(struct inode *dir, struct dentry *dentry)
{
int
error
;
shrink_dcache_parent
(
dentry
);
rpc_inode_setowner
(
dentry
->
d_inode
,
NULL
);
if
((
error
=
simple_rmdir
(
dir
,
dentry
))
!=
0
)
return
error
;
...
...
net/sunrpc/xprt.c
View file @
a66bce5b
...
...
@@ -1272,6 +1272,27 @@ do_xprt_reserve(struct rpc_task *task)
rpc_sleep_on
(
&
xprt
->
backlog
,
task
,
NULL
,
NULL
);
}
/*
* Allocate a 'unique' XID
*/
static
u32
xprt_alloc_xid
(
void
)
{
static
spinlock_t
xid_lock
=
SPIN_LOCK_UNLOCKED
;
static
int
need_init
=
1
;
static
u32
xid
;
u32
ret
;
spin_lock
(
&
xid_lock
);
if
(
unlikely
(
need_init
))
{
xid
=
get_seconds
()
<<
12
;
need_init
=
0
;
}
ret
=
xid
++
;
spin_unlock
(
&
xid_lock
);
return
ret
;
}
/*
* Initialize RPC request
*/
...
...
@@ -1279,19 +1300,14 @@ static void
xprt_request_init
(
struct
rpc_task
*
task
,
struct
rpc_xprt
*
xprt
)
{
struct
rpc_rqst
*
req
=
task
->
tk_rqstp
;
static
u32
xid
=
0
;
if
(
!
xid
)
xid
=
get_seconds
()
<<
12
;
dprintk
(
"RPC: %4d reserved req %p xid %08x
\n
"
,
task
->
tk_pid
,
req
,
xid
);
req
->
rq_timeout
=
xprt
->
timeout
;
req
->
rq_task
=
task
;
req
->
rq_xprt
=
xprt
;
req
->
rq_xid
=
xid
++
;
if
(
!
xid
)
xid
++
;
req
->
rq_xid
=
xprt_alloc_xid
();
INIT_LIST_HEAD
(
&
req
->
rq_list
);
dprintk
(
"RPC: %4d reserved req %p xid %08x
\n
"
,
task
->
tk_pid
,
req
,
req
->
rq_xid
);
}
/*
...
...
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