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
a3d96251
Commit
a3d96251
authored
Feb 07, 2002
by
Alexander Viro
Committed by
Linus Torvalds
Feb 07, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] knfsd cleanups
exp_child() and exp_parent() take super_block instead of kdev_t.
parent
3c7cb3ec
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
fs/nfsd/export.c
fs/nfsd/export.c
+9
-9
No files found.
fs/nfsd/export.c
View file @
a3d96251
...
...
@@ -32,9 +32,9 @@
typedef
struct
svc_client
svc_client
;
typedef
struct
svc_export
svc_export
;
static
svc_export
*
exp_parent
(
svc_client
*
clp
,
kdev_t
dev
,
static
svc_export
*
exp_parent
(
svc_client
*
clp
,
struct
super_block
*
sb
,
struct
dentry
*
dentry
);
static
svc_export
*
exp_child
(
svc_client
*
clp
,
kdev_t
dev
,
static
svc_export
*
exp_child
(
svc_client
*
clp
,
struct
super_block
*
sb
,
struct
dentry
*
dentry
);
static
void
exp_unexport_all
(
svc_client
*
clp
);
static
void
exp_do_unexport
(
svc_export
*
unexp
);
...
...
@@ -91,14 +91,14 @@ exp_get(svc_client *clp, kdev_t dev, ino_t ino)
* Find the export entry for a given dentry. <gam3@acm.org>
*/
static
svc_export
*
exp_parent
(
svc_client
*
clp
,
kdev_t
dev
,
struct
dentry
*
dentry
)
exp_parent
(
svc_client
*
clp
,
struct
super_block
*
sb
,
struct
dentry
*
dentry
)
{
svc_export
*
exp
;
if
(
clp
==
NULL
)
return
NULL
;
for
(
exp
=
clp
->
cl_export
[
EXPORT_HASH
(
dev
)];
exp
;
exp
=
exp
->
ex_next
)
for
(
exp
=
clp
->
cl_export
[
EXPORT_HASH
(
sb
->
s_
dev
)];
exp
;
exp
=
exp
->
ex_next
)
if
(
is_subdir
(
dentry
,
exp
->
ex_dentry
))
break
;
return
exp
;
...
...
@@ -110,14 +110,14 @@ exp_parent(svc_client *clp, kdev_t dev, struct dentry *dentry)
* <gam3@acm.org>
*/
static
svc_export
*
exp_child
(
svc_client
*
clp
,
kdev_t
dev
,
struct
dentry
*
dentry
)
exp_child
(
svc_client
*
clp
,
struct
super_block
*
sb
,
struct
dentry
*
dentry
)
{
svc_export
*
exp
;
if
(
clp
==
NULL
)
return
NULL
;
for
(
exp
=
clp
->
cl_export
[
EXPORT_HASH
(
dev
)];
exp
;
exp
=
exp
->
ex_next
)
{
for
(
exp
=
clp
->
cl_export
[
EXPORT_HASH
(
sb
->
s_
dev
)];
exp
;
exp
=
exp
->
ex_next
)
{
struct
dentry
*
ndentry
=
exp
->
ex_dentry
;
if
(
ndentry
&&
is_subdir
(
ndentry
->
d_parent
,
dentry
))
break
;
...
...
@@ -205,12 +205,12 @@ exp_export(struct nfsctl_export *nxp)
goto
finish
;
}
if
((
parent
=
exp_child
(
clp
,
dev
,
nd
.
dentry
))
!=
NULL
)
{
if
((
parent
=
exp_child
(
clp
,
inode
->
i_sb
,
nd
.
dentry
))
!=
NULL
)
{
dprintk
(
"exp_export: export not valid (Rule 3).
\n
"
);
goto
finish
;
}
/* Is this is a sub-export, must be a proper subset of FS */
if
((
parent
=
exp_parent
(
clp
,
dev
,
nd
.
dentry
))
!=
NULL
)
{
if
((
parent
=
exp_parent
(
clp
,
inode
->
i_sb
,
nd
.
dentry
))
!=
NULL
)
{
dprintk
(
"exp_export: sub-export not valid (Rule 2).
\n
"
);
goto
finish
;
}
...
...
@@ -386,7 +386,7 @@ exp_rootfh(struct svc_client *clp, char *path, struct knfsd_fh *f, int maxsize)
dprintk
(
"nfsd: exp_rootfh(%s [%p] %s:%02x:%02x/%ld)
\n
"
,
path
,
nd
.
dentry
,
clp
->
cl_ident
,
major
(
dev
),
minor
(
dev
),
(
long
)
inode
->
i_ino
);
exp
=
exp_parent
(
clp
,
dev
,
nd
.
dentry
);
exp
=
exp_parent
(
clp
,
inode
->
i_sb
,
nd
.
dentry
);
if
(
!
exp
)
{
dprintk
(
"nfsd: exp_rootfh export not found.
\n
"
);
goto
out
;
...
...
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