summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--xlators/system/posix-acl/src/posix-acl.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/xlators/system/posix-acl/src/posix-acl.c b/xlators/system/posix-acl/src/posix-acl.c
index 9183105ca00..83ea28f541c 100644
--- a/xlators/system/posix-acl/src/posix-acl.c
+++ b/xlators/system/posix-acl/src/posix-acl.c
@@ -875,6 +875,13 @@ posix_acl_ctx_update(inode_t *inode, xlator_t *this, struct iatt *buf,
int ret = 0;
int i = 0;
+ if (!buf || !buf->ia_ctime) {
+ /* No need to update ctx if buf is empty */
+ gf_log_callingfn(this->name, GF_LOG_DEBUG, "iatt struct is empty (%d)",
+ fop);
+ goto out;
+ }
+
LOCK(&inode->lock);
{
ctx = __posix_acl_ctx_get(inode, this, _gf_true);
@@ -928,6 +935,7 @@ posix_acl_ctx_update(inode_t *inode, xlator_t *this, struct iatt *buf,
}
unlock:
UNLOCK(&inode->lock);
+out:
return ret;
}