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
ae7095a7
Commit
ae7095a7
authored
Oct 01, 2012
by
J. Bruce Fields
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nfsd4: helper function for getting mounted_on ino
Signed-off-by:
J. Bruce Fields
<
bfields@redhat.com
>
parent
3c40794b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
12 deletions
+18
-12
fs/nfsd/nfs4xdr.c
fs/nfsd/nfs4xdr.c
+18
-12
No files found.
fs/nfsd/nfs4xdr.c
View file @
ae7095a7
...
...
@@ -2014,6 +2014,22 @@ static __be32 fattr_handle_absent_fs(u32 *bmval0, u32 *bmval1, u32 *rdattr_err)
return
0
;
}
static
int
get_parent_attributes
(
struct
svc_export
*
exp
,
struct
kstat
*
stat
)
{
struct
path
path
=
exp
->
ex_path
;
int
err
;
path_get
(
&
path
);
while
(
follow_up
(
&
path
))
{
if
(
path
.
dentry
!=
path
.
mnt
->
mnt_root
)
break
;
}
err
=
vfs_getattr
(
path
.
mnt
,
path
.
dentry
,
stat
);
path_put
(
&
path
);
return
err
;
}
/*
* Note: @fhp can be NULL; in this case, we might have to compose the filehandle
* ourselves.
...
...
@@ -2430,18 +2446,8 @@ nfsd4_encode_fattr(struct svc_fh *fhp, struct svc_export *exp,
* and this is the root of a cross-mounted filesystem.
*/
if
(
ignore_crossmnt
==
0
&&
dentry
==
exp
->
ex_path
.
mnt
->
mnt_root
)
{
struct
path
path
=
exp
->
ex_path
;
path_get
(
&
path
);
while
(
follow_up
(
&
path
))
{
if
(
path
.
dentry
!=
path
.
mnt
->
mnt_root
)
break
;
}
err
=
vfs_getattr
(
path
.
mnt
,
path
.
dentry
,
&
stat
);
path_put
(
&
path
);
if
(
err
)
goto
out_nfserr
;
}
dentry
==
exp
->
ex_path
.
mnt
->
mnt_root
)
get_parent_attributes
(
exp
,
&
stat
);
WRITE64
(
stat
.
ino
);
}
if
(
bmval2
&
FATTR4_WORD2_SUPPATTR_EXCLCREAT
)
{
...
...
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