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
9b9f8494
Commit
9b9f8494
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
logics in nfsd_lookup() cleaned up (see above, only more so ;-/)
parent
20fa6233
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
28 deletions
+23
-28
fs/nfsd/vfs.c
fs/nfsd/vfs.c
+23
-28
No files found.
fs/nfsd/vfs.c
View file @
9b9f8494
...
@@ -114,35 +114,30 @@ nfsd_lookup(struct svc_rqst *rqstp, struct svc_fh *fhp, const char *name,
...
@@ -114,35 +114,30 @@ nfsd_lookup(struct svc_rqst *rqstp, struct svc_fh *fhp, const char *name,
if
(
isdotent
(
name
,
len
))
{
if
(
isdotent
(
name
,
len
))
{
if
(
len
==
1
)
if
(
len
==
1
)
dentry
=
dget
(
dparent
);
dentry
=
dget
(
dparent
);
else
{
/* must be ".." */
else
if
(
dparent
!=
exp
->
ex_dentry
)
dentry
=
dget
(
dparent
->
d_parent
);
else
if
(
!
EX_CROSSMNT
(
exp
))
dentry
=
dget
(
dparent
);
/* .. == . just like at / */
else
{
/* checking mountpoint crossing is very different when stepping up */
/* checking mountpoint crossing is very different when stepping up */
if
(
dparent
==
exp
->
ex_dentry
)
{
struct
svc_export
*
exp2
=
NULL
;
if
(
!
EX_CROSSMNT
(
exp
))
struct
dentry
*
dp
;
dentry
=
dget
(
dparent
);
/* .. == . just like at / */
struct
vfsmount
*
mnt
=
mntget
(
exp
->
ex_mnt
);
else
dentry
=
dget
(
dparent
);
{
while
(
follow_up
(
&
mnt
,
&
dentry
))
struct
svc_export
*
exp2
=
NULL
;
;
struct
dentry
*
dp
;
dp
=
dget
(
dentry
->
d_parent
);
struct
vfsmount
*
mnt
=
mntget
(
exp
->
ex_mnt
);
dput
(
dentry
);
dentry
=
dget
(
dparent
);
dentry
=
dp
;
while
(
follow_up
(
&
mnt
,
&
dentry
))
for
(
;
!
exp2
&&
dp
->
d_parent
!=
dp
;
dp
=
dp
->
d_parent
)
;
exp2
=
exp_get_by_name
(
exp
->
ex_client
,
mnt
,
dp
);
dp
=
dget
(
dentry
->
d_parent
);
if
(
!
exp2
)
{
dput
(
dentry
);
dput
(
dentry
);
dentry
=
dp
;
dentry
=
dget
(
dparent
);
for
(
;
exp2
==
NULL
&&
dp
->
d_parent
!=
dp
;
}
else
{
dp
=
dp
->
d_parent
)
exp
=
exp2
;
exp2
=
exp_get_by_name
(
exp
->
ex_client
,
mnt
,
dp
);
}
if
(
exp2
==
NULL
)
{
mntput
(
mnt
);
dput
(
dentry
);
dentry
=
dget
(
dparent
);
}
else
{
exp
=
exp2
;
}
mntput
(
mnt
);
}
}
else
dentry
=
dget
(
dparent
->
d_parent
);
}
}
}
else
{
}
else
{
fh_lock
(
fhp
);
fh_lock
(
fhp
);
...
...
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