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
23a30612
Commit
23a30612
authored
Apr 16, 2010
by
Trond Myklebust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NFS: Reduce the stack footprint of nfs_proc_symlink()
Signed-off-by:
Trond Myklebust
<
Trond.Myklebust@netapp.com
>
parent
eb872f0c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
10 deletions
+16
-10
fs/nfs/proc.c
fs/nfs/proc.c
+16
-10
No files found.
fs/nfs/proc.c
View file @
23a30612
...
...
@@ -418,8 +418,8 @@ static int
nfs_proc_symlink
(
struct
inode
*
dir
,
struct
dentry
*
dentry
,
struct
page
*
page
,
unsigned
int
len
,
struct
iattr
*
sattr
)
{
struct
nfs_fh
fhandle
;
struct
nfs_fattr
fattr
;
struct
nfs_fh
*
fh
;
struct
nfs_fattr
*
fattr
;
struct
nfs_symlinkargs
arg
=
{
.
fromfh
=
NFS_FH
(
dir
),
.
fromname
=
dentry
->
d_name
.
name
,
...
...
@@ -432,12 +432,18 @@ nfs_proc_symlink(struct inode *dir, struct dentry *dentry, struct page *page,
.
rpc_proc
=
&
nfs_procedures
[
NFSPROC_SYMLINK
],
.
rpc_argp
=
&
arg
,
};
int
status
;
int
status
=
-
ENAMETOOLONG
;
dprintk
(
"NFS call symlink %s
\n
"
,
dentry
->
d_name
.
name
);
if
(
len
>
NFS2_MAXPATHLEN
)
return
-
ENAMETOOLONG
;
goto
out
;
dprintk
(
"NFS call symlink %s
\n
"
,
dentry
->
d_name
.
name
);
fh
=
nfs_alloc_fhandle
();
fattr
=
nfs_alloc_fattr
();
status
=
-
ENOMEM
;
if
(
fh
==
NULL
||
fattr
==
NULL
)
goto
out
;
status
=
rpc_call_sync
(
NFS_CLIENT
(
dir
),
&
msg
,
0
);
nfs_mark_for_revalidate
(
dir
);
...
...
@@ -447,12 +453,12 @@ nfs_proc_symlink(struct inode *dir, struct dentry *dentry, struct page *page,
* filehandle size to zero indicates to nfs_instantiate that it
* should fill in the data with a LOOKUP call on the wire.
*/
if
(
status
==
0
)
{
nfs_fattr_init
(
&
fattr
);
fhandle
.
size
=
0
;
status
=
nfs_instantiate
(
dentry
,
&
fhandle
,
&
fattr
);
}
if
(
status
==
0
)
status
=
nfs_instantiate
(
dentry
,
fh
,
fattr
);
nfs_free_fattr
(
fattr
);
nfs_free_fhandle
(
fh
);
out:
dprintk
(
"NFS reply symlink: %d
\n
"
,
status
);
return
status
;
}
...
...
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