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
04ffdbe2
Commit
04ffdbe2
authored
Apr 16, 2010
by
Trond Myklebust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NFS: Reduce the stack footprint of nfs_follow_remote_path()
Signed-off-by:
Trond Myklebust
<
Trond.Myklebust@netapp.com
>
parent
e1fb4d05
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
6 deletions
+12
-6
fs/nfs/super.c
fs/nfs/super.c
+12
-6
No files found.
fs/nfs/super.c
View file @
04ffdbe2
...
...
@@ -2672,38 +2672,44 @@ static void nfs_fix_devname(const struct path *path, struct vfsmount *mnt)
static
int
nfs_follow_remote_path
(
struct
vfsmount
*
root_mnt
,
const
char
*
export_path
,
struct
vfsmount
*
mnt_target
)
{
struct
nameidata
*
nd
=
NULL
;
struct
mnt_namespace
*
ns_private
;
struct
nameidata
nd
;
struct
super_block
*
s
;
int
ret
;
nd
=
kmalloc
(
sizeof
(
*
nd
),
GFP_KERNEL
);
if
(
nd
==
NULL
)
return
-
ENOMEM
;
ns_private
=
create_mnt_ns
(
root_mnt
);
ret
=
PTR_ERR
(
ns_private
);
if
(
IS_ERR
(
ns_private
))
goto
out_mntput
;
ret
=
vfs_path_lookup
(
root_mnt
->
mnt_root
,
root_mnt
,
export_path
,
LOOKUP_FOLLOW
,
&
nd
);
export_path
,
LOOKUP_FOLLOW
,
nd
);
put_mnt_ns
(
ns_private
);
if
(
ret
!=
0
)
goto
out_err
;
s
=
nd
.
path
.
mnt
->
mnt_sb
;
s
=
nd
->
path
.
mnt
->
mnt_sb
;
atomic_inc
(
&
s
->
s_active
);
mnt_target
->
mnt_sb
=
s
;
mnt_target
->
mnt_root
=
dget
(
nd
.
path
.
dentry
);
mnt_target
->
mnt_root
=
dget
(
nd
->
path
.
dentry
);
/* Correct the device pathname */
nfs_fix_devname
(
&
nd
.
path
,
mnt_target
);
nfs_fix_devname
(
&
nd
->
path
,
mnt_target
);
path_put
(
&
nd
.
path
);
path_put
(
&
nd
->
path
);
kfree
(
nd
);
down_write
(
&
s
->
s_umount
);
return
0
;
out_mntput:
mntput
(
root_mnt
);
out_err:
kfree
(
nd
);
return
ret
;
}
...
...
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