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
121bed24
Commit
121bed24
authored
Jun 26, 2003
by
Neil Brown
Committed by
Linus Torvalds
Jun 26, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] Remove path buffer passed around by cache_show routines
this was need for paths, but now we have seq_path...
parent
cde37947
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
26 deletions
+12
-26
fs/nfsd/export.c
fs/nfsd/export.c
+4
-6
include/linux/sunrpc/cache.h
include/linux/sunrpc/cache.h
+1
-2
net/sunrpc/cache.c
net/sunrpc/cache.c
+6
-16
net/sunrpc/svcauth_unix.c
net/sunrpc/svcauth_unix.c
+1
-2
No files found.
fs/nfsd/export.c
View file @
121bed24
...
...
@@ -195,8 +195,7 @@ int expkey_parse(struct cache_detail *cd, char *mesg, int mlen)
static
int
expkey_show
(
struct
seq_file
*
m
,
struct
cache_detail
*
cd
,
struct
cache_head
*
h
,
char
*
pbuf
)
struct
cache_head
*
h
)
{
struct
svc_expkey
*
ek
;
...
...
@@ -437,8 +436,7 @@ static void exp_flags(struct seq_file *m, int flag, int fsid, uid_t anonu, uid_t
static
int
svc_export_show
(
struct
seq_file
*
m
,
struct
cache_detail
*
cd
,
struct
cache_head
*
h
,
char
*
pbuf
)
struct
cache_head
*
h
)
{
struct
svc_export
*
exp
;
...
...
@@ -1045,7 +1043,7 @@ static int e_show(struct seq_file *m, void *p)
if
(
cache_check
(
&
svc_export_cache
,
&
exp
->
h
,
NULL
))
return
0
;
if
(
cache_put
(
&
exp
->
h
,
&
svc_export_cache
))
BUG
();
return
svc_export_show
(
m
,
&
svc_export_cache
,
cp
,
NULL
);
return
svc_export_show
(
m
,
&
svc_export_cache
,
cp
);
}
struct
seq_operations
nfs_exports_op
=
{
...
...
include/linux/sunrpc/cache.h
View file @
121bed24
...
...
@@ -80,8 +80,7 @@ struct cache_detail {
int
(
*
cache_show
)(
struct
seq_file
*
m
,
struct
cache_detail
*
cd
,
struct
cache_head
*
h
,
char
*
pbuf
);
struct
cache_head
*
h
);
/* fields below this comment are for internal use
* and should not be touched by cache owners
...
...
net/sunrpc/cache.c
View file @
121bed24
...
...
@@ -1018,7 +1018,6 @@ int qword_get(char **bpp, char *dest, int bufsize)
struct
handle
{
struct
cache_detail
*
cd
;
char
*
pbuf
;
};
static
void
*
c_start
(
struct
seq_file
*
m
,
loff_t
*
pos
)
...
...
@@ -1087,10 +1086,9 @@ static int c_show(struct seq_file *m, void *p)
{
struct
cache_head
*
cp
=
p
;
struct
cache_detail
*
cd
=
((
struct
handle
*
)
m
->
private
)
->
cd
;
char
*
pbuf
=
((
struct
handle
*
)
m
->
private
)
->
pbuf
;
if
(
p
==
(
void
*
)
1
)
return
cd
->
cache_show
(
m
,
cd
,
NULL
,
pbuf
);
return
cd
->
cache_show
(
m
,
cd
,
NULL
);
ifdebug
(
CACHE
)
seq_printf
(
m
,
"# expiry=%ld refcnt=%d
\n
"
,
...
...
@@ -1102,7 +1100,7 @@ static int c_show(struct seq_file *m, void *p)
else
cache_put
(
cp
,
cd
);
return
cd
->
cache_show
(
m
,
cd
,
cp
,
pbuf
);
return
cd
->
cache_show
(
m
,
cd
,
cp
);
}
struct
seq_operations
cache_content_op
=
{
...
...
@@ -1115,26 +1113,19 @@ struct seq_operations cache_content_op = {
static
int
content_open
(
struct
inode
*
inode
,
struct
file
*
file
)
{
int
res
;
char
*
namebuf
=
kmalloc
(
PAGE_SIZE
,
GFP_KERNEL
);
struct
handle
*
han
;
struct
cache_detail
*
cd
=
PDE
(
inode
)
->
data
;
if
(
namebuf
==
NULL
)
return
-
ENOMEM
;
han
=
kmalloc
(
sizeof
(
*
han
),
GFP_KERNEL
);
if
(
han
==
NULL
)
{
kfree
(
namebuf
);
if
(
han
==
NULL
)
return
-
ENOMEM
;
}
han
->
pbuf
=
namebuf
;
han
->
cd
=
cd
;
res
=
seq_open
(
file
,
&
cache_content_op
);
if
(
res
)
{
kfree
(
namebuf
);
if
(
res
)
kfree
(
han
);
}
else
else
((
struct
seq_file
*
)
file
->
private_data
)
->
private
=
han
;
return
res
;
...
...
@@ -1143,7 +1134,6 @@ static int content_release(struct inode *inode, struct file *file)
{
struct
seq_file
*
m
=
(
struct
seq_file
*
)
file
->
private_data
;
struct
handle
*
han
=
m
->
private
;
kfree
(
han
->
pbuf
);
kfree
(
han
);
m
->
private
=
NULL
;
return
seq_release
(
inode
,
file
);
...
...
net/sunrpc/svcauth_unix.c
View file @
121bed24
...
...
@@ -215,8 +215,7 @@ static int ip_map_parse(struct cache_detail *cd,
static
int
ip_map_show
(
struct
seq_file
*
m
,
struct
cache_detail
*
cd
,
struct
cache_head
*
h
,
char
*
pbuf
)
struct
cache_head
*
h
)
{
struct
ip_map
*
im
;
struct
in_addr
addr
;
...
...
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