|
@@ -1659,6 +1659,22 @@ void d_set_d_op(struct dentry *dentry, const struct dentry_operations *op)
|
|
|
}
|
|
|
EXPORT_SYMBOL(d_set_d_op);
|
|
|
|
|
|
+
|
|
|
+/*
|
|
|
+ * d_set_fallthru - Mark a dentry as falling through to a lower layer
|
|
|
+ * @dentry - The dentry to mark
|
|
|
+ *
|
|
|
+ * Mark a dentry as falling through to the lower layer (as set with
|
|
|
+ * d_pin_lower()). This flag may be recorded on the medium.
|
|
|
+ */
|
|
|
+void d_set_fallthru(struct dentry *dentry)
|
|
|
+{
|
|
|
+ spin_lock(&dentry->d_lock);
|
|
|
+ dentry->d_flags |= DCACHE_FALLTHRU;
|
|
|
+ spin_unlock(&dentry->d_lock);
|
|
|
+}
|
|
|
+EXPORT_SYMBOL(d_set_fallthru);
|
|
|
+
|
|
|
static unsigned d_flags_for_inode(struct inode *inode)
|
|
|
{
|
|
|
unsigned add_flags = DCACHE_FILE_TYPE;
|
|
@@ -1691,7 +1707,8 @@ static void __d_instantiate(struct dentry *dentry, struct inode *inode)
|
|
|
unsigned add_flags = d_flags_for_inode(inode);
|
|
|
|
|
|
spin_lock(&dentry->d_lock);
|
|
|
- __d_set_type(dentry, add_flags);
|
|
|
+ dentry->d_flags &= ~(DCACHE_ENTRY_TYPE | DCACHE_FALLTHRU);
|
|
|
+ dentry->d_flags |= add_flags;
|
|
|
if (inode)
|
|
|
hlist_add_head(&dentry->d_u.d_alias, &inode->i_dentry);
|
|
|
dentry->d_inode = inode;
|