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 | |
parent | 8c85e125124a473d6f3e9bb187b0b84207f81d91 (diff) | |
download | op-kernel-dev-f3da392e9ff14b9f388e74319e6d195848991c07.zip op-kernel-dev-f3da392e9ff14b9f388e74319e6d195848991c07.tar.gz |
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')
-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 72ce2ae..30b93b2 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; |