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
1b4c6065
Commit
1b4c6065
authored
Apr 19, 2010
by
Trond Myklebust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NFS: Replace nfsroot on-stack filehandle
Signed-off-by:
Trond Myklebust
<
Trond.Myklebust@netapp.com
>
parent
b157b06c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
fs/nfs/nfsroot.c
fs/nfs/nfsroot.c
+8
-6
No files found.
fs/nfs/nfsroot.c
View file @
1b4c6065
...
...
@@ -488,7 +488,6 @@ static int __init root_nfs_ports(void)
*/
static
int
__init
root_nfs_get_handle
(
void
)
{
struct
nfs_fh
fh
;
struct
sockaddr_in
sin
;
unsigned
int
auth_flav_len
=
0
;
struct
nfs_mount_request
request
=
{
...
...
@@ -499,21 +498,24 @@ static int __init root_nfs_get_handle(void)
NFS_MNT3_VERSION
:
NFS_MNT_VERSION
,
.
protocol
=
(
nfs_data
.
flags
&
NFS_MOUNT_TCP
)
?
XPRT_TRANSPORT_TCP
:
XPRT_TRANSPORT_UDP
,
.
fh
=
&
fh
,
.
auth_flav_len
=
&
auth_flav_len
,
};
int
status
;
int
status
=
-
ENOMEM
;
request
.
fh
=
nfs_alloc_fhandle
();
if
(
!
request
.
fh
)
goto
out
;
set_sockaddr
(
&
sin
,
servaddr
,
htons
(
mount_port
));
status
=
nfs_mount
(
&
request
);
if
(
status
<
0
)
printk
(
KERN_ERR
"Root-NFS: Server returned error %d "
"while mounting %s
\n
"
,
status
,
nfs_export_path
);
else
{
nfs_data
.
root
.
size
=
fh
.
size
;
memcpy
(
nfs_data
.
root
.
data
,
fh
.
data
,
fh
.
size
);
nfs_data
.
root
.
size
=
request
.
fh
->
size
;
memcpy
(
&
nfs_data
.
root
.
data
,
request
.
fh
->
data
,
request
.
fh
->
size
);
}
nfs_free_fhandle
(
request
.
fh
);
out:
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