summaryrefslogtreecommitdiffstats
path: root/xlators/performance/md-cache
diff options
context:
space:
mode:
authorPoornima G <pgurusid@redhat.com>2016-07-29 12:20:11 +0530
committerJeff Darcy <jdarcy@redhat.com>2016-08-04 08:46:44 -0700
commit5ae0a5d1e92175c28cd5470b890e99ff4eac0673 (patch)
tree2654eceb637d64e73897bbb88b081ff277a25f9e /xlators/performance/md-cache
parent2650f8b1101a1f345f310475841569feb852bf4b (diff)
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 <pgurusid@redhat.com> Reviewed-on: http://review.gluster.org/15043 Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Niels de Vos <ndevos@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Prashanth Pai <ppai@redhat.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Diffstat (limited to 'xlators/performance/md-cache')
-rw-r--r--xlators/performance/md-cache/src/md-cache.c5
1 files changed, 4 insertions, 1 deletions
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;