summaryrefslogtreecommitdiffstats
path: root/xlators/features/upcall/src/upcall-internal.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/features/upcall/src/upcall-internal.c')
-rw-r--r--xlators/features/upcall/src/upcall-internal.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/xlators/features/upcall/src/upcall-internal.c b/xlators/features/upcall/src/upcall-internal.c
index f4b308c1dca..8484113cc48 100644
--- a/xlators/features/upcall/src/upcall-internal.c
+++ b/xlators/features/upcall/src/upcall-internal.c
@@ -327,6 +327,24 @@ out:
return ret;
}
+void
+upcall_cache_invalidate_dir (call_frame_t *frame, xlator_t *this,
+ client_t *client, inode_t *inode, uint32_t flags)
+{
+ dentry_t *dentry;
+ dentry_t *dentry_tmp;
+
+ if (!is_cache_invalidation_enabled(this))
+ return;
+
+ list_for_each_entry_safe (dentry, dentry_tmp,
+ &inode->dentry_list,
+ inode_list) {
+ upcall_cache_invalidate (frame, this, client,
+ dentry->inode, flags);
+ }
+}
+
/*
* Given a gfid, client, first fetch upcall_entry_t based on gfid.
* Later traverse through the client list of that upcall entry. If this client
@@ -347,6 +365,9 @@ upcall_cache_invalidate (call_frame_t *frame, xlator_t *this, client_t *client,
upcall_inode_ctx_t *up_inode_ctx = NULL;
gf_boolean_t found = _gf_false;
+ if (!is_cache_invalidation_enabled(this))
+ return;
+
up_inode_ctx = ((upcall_local_t *)frame->local)->upcall_inode_ctx;
if (!up_inode_ctx)