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
d6cb125b
Commit
d6cb125b
authored
Dec 24, 2014
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kill d_validate()
no users left Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
5e993e25
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
34 deletions
+0
-34
fs/dcache.c
fs/dcache.c
+0
-31
include/linux/dcache.h
include/linux/dcache.h
+0
-3
No files found.
fs/dcache.c
View file @
d6cb125b
...
...
@@ -2187,37 +2187,6 @@ struct dentry *d_hash_and_lookup(struct dentry *dir, struct qstr *name)
}
EXPORT_SYMBOL
(
d_hash_and_lookup
);
/**
* d_validate - verify dentry provided from insecure source (deprecated)
* @dentry: The dentry alleged to be valid child of @dparent
* @dparent: The parent dentry (known to be valid)
*
* An insecure source has sent us a dentry, here we verify it and dget() it.
* This is used by ncpfs in its readdir implementation.
* Zero is returned in the dentry is invalid.
*
* This function is slow for big directories, and deprecated, do not use it.
*/
int
d_validate
(
struct
dentry
*
dentry
,
struct
dentry
*
dparent
)
{
struct
dentry
*
child
;
spin_lock
(
&
dparent
->
d_lock
);
list_for_each_entry
(
child
,
&
dparent
->
d_subdirs
,
d_child
)
{
if
(
dentry
==
child
)
{
spin_lock_nested
(
&
dentry
->
d_lock
,
DENTRY_D_LOCK_NESTED
);
__dget_dlock
(
dentry
);
spin_unlock
(
&
dentry
->
d_lock
);
spin_unlock
(
&
dparent
->
d_lock
);
return
1
;
}
}
spin_unlock
(
&
dparent
->
d_lock
);
return
0
;
}
EXPORT_SYMBOL
(
d_validate
);
/*
* When a file is deleted, we have two options:
* - turn this dentry into a negative dentry
...
...
include/linux/dcache.h
View file @
d6cb125b
...
...
@@ -319,9 +319,6 @@ static inline unsigned d_count(const struct dentry *dentry)
return
dentry
->
d_lockref
.
count
;
}
/* validate "insecure" dentry pointer */
extern
int
d_validate
(
struct
dentry
*
,
struct
dentry
*
);
/*
* helper function for dentry_operations.d_dname() members
*/
...
...
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