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
d2d9e9fb
Commit
d2d9e9fb
authored
Jun 20, 2011
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
merge do_revalidate() into its only caller
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
4ad5abb3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
24 deletions
+18
-24
fs/namei.c
fs/namei.c
+18
-24
No files found.
fs/namei.c
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
);
...
...
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