mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-20 21:51:05 +00:00
dcache: extrace and use d_unlinked()
d_unlinked() will be used in middle-term to ban checkpointing when opened but unlinked file is detected, and in long term, to detect such situation and special case on it. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
8c85e12512
commit
f3da392e9f
3 changed files with 12 additions and 8 deletions
|
@ -353,6 +353,11 @@ static inline int d_unhashed(struct dentry *dentry)
|
|||
return (dentry->d_flags & DCACHE_UNHASHED);
|
||||
}
|
||||
|
||||
static inline int d_unlinked(struct dentry *dentry)
|
||||
{
|
||||
return d_unhashed(dentry) && !IS_ROOT(dentry);
|
||||
}
|
||||
|
||||
static inline struct dentry *dget_parent(struct dentry *dentry)
|
||||
{
|
||||
struct dentry *ret;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue