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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user