From 5ae0a5d1e92175c28cd5470b890e99ff4eac0673 Mon Sep 17 00:00:00 2001 From: Poornima G Date: Fri, 29 Jul 2016 12:20:11 +0530 Subject: md-cache/upcall: In case of mode bit change invalidate xattr When the mode bits are changed, the ACL entries also do get affected. Currently in upcall, setattr invalidates only the stat info. With this patch, if mode bits are changed, the upcall will invalidate all the xattrs. Change-Id: Iccda2e1a7440ee845aa5442bf51970f74d9b0862 BUG: 1211863 Signed-off-by: Poornima G Reviewed-on: http://review.gluster.org/15043 Smoke: Gluster Build System CentOS-regression: Gluster Build System Reviewed-by: Niels de Vos NetBSD-regression: NetBSD Build System Reviewed-by: Prashanth Pai Reviewed-by: Jeff Darcy --- xlators/performance/md-cache/src/md-cache.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'xlators/performance/md-cache') diff --git a/xlators/performance/md-cache/src/md-cache.c b/xlators/performance/md-cache/src/md-cache.c index be42bf0a885..8a381b18981 100644 --- a/xlators/performance/md-cache/src/md-cache.c +++ b/xlators/performance/md-cache/src/md-cache.c @@ -2402,7 +2402,10 @@ mdc_invalidate (xlator_t *this, void *data) goto out; } if (up_ci->flags & UP_XATTR) { - ret = mdc_inode_xatt_update (this, inode, up_ci->dict); + if (up_ci->dict) + ret = mdc_inode_xatt_update (this, inode, up_ci->dict); + else + ret = mdc_inode_xatt_invalidate (this, inode); } else if (up_ci->flags & UP_XATTR_RM) { tmp.inode = inode; tmp.this = this; -- cgit