diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2009-05-04 03:32:03 +0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2009-06-11 21:36:06 -0400 |
commit | f3da392e9ff14b9f388e74319e6d195848991c07 (patch) | |
tree | d9e7660e5c0b4524aeaafcc5b89a9d68a7ca3817 /include/linux/dcache.h | |
parent | 8c85e125124a473d6f3e9bb187b0b84207f81d91 (diff) |
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>
Diffstat (limited to 'include/linux/dcache.h')
-rw-r--r-- | include/linux/dcache.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/dcache.h b/include/linux/dcache.h index 72ce2ae88591..30b93b2a01a4 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h @@ -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; |