Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
X
xcap-capability-linux
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
xcap
xcap-capability-linux
Commits
d2d9e9fb
Commit
d2d9e9fb
authored
Jun 20, 2011
by
Al Viro
Browse files
Options
Downloads
Patches
Plain Diff
merge do_revalidate() into its only caller
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
4ad5abb3
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
fs/namei.c
+18
-24
18 additions, 24 deletions
fs/namei.c
with
18 additions
and
24 deletions
fs/namei.c
+
18
−
24
View file @
d2d9e9fb
...
...
@@ -436,28 +436,6 @@ static inline int d_revalidate(struct dentry *dentry, struct nameidata *nd)
return
dentry
->
d_op
->
d_revalidate
(
dentry
,
nd
);
}
static
struct
dentry
*
do_revalidate
(
struct
dentry
*
dentry
,
struct
nameidata
*
nd
)
{
int
status
=
d_revalidate
(
dentry
,
nd
);
if
(
unlikely
(
status
<=
0
))
{
/*
* The dentry failed validation.
* If d_revalidate returned 0 attempt to invalidate
* the dentry otherwise d_revalidate is asking us
* to return a fail status.
*/
if
(
status
<
0
)
{
dput
(
dentry
);
dentry
=
ERR_PTR
(
status
);
}
else
if
(
!
d_invalidate
(
dentry
))
{
dput
(
dentry
);
dentry
=
NULL
;
}
}
return
dentry
;
}
/**
* complete_walk - successful completion of path walk
* @nd: pointer nameidata
...
...
@@ -1642,8 +1620,24 @@ static struct dentry *__lookup_hash(struct qstr *name,
return
dentry
;
}
if
(
dentry
&&
(
dentry
->
d_flags
&
DCACHE_OP_REVALIDATE
))
dentry
=
do_revalidate
(
dentry
,
nd
);
if
(
dentry
&&
(
dentry
->
d_flags
&
DCACHE_OP_REVALIDATE
))
{
int
status
=
d_revalidate
(
dentry
,
nd
);
if
(
unlikely
(
status
<=
0
))
{
/*
* The dentry failed validation.
* If d_revalidate returned 0 attempt to invalidate
* the dentry otherwise d_revalidate is asking us
* to return a fail status.
*/
if
(
status
<
0
)
{
dput
(
dentry
);
return
ERR_PTR
(
status
);
}
else
if
(
!
d_invalidate
(
dentry
))
{
dput
(
dentry
);
dentry
=
NULL
;
}
}
}
if
(
!
dentry
)
dentry
=
d_alloc_and_lookup
(
base
,
name
,
nd
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment