summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJiffin Tony Thottan <jthottan@gmail.com>2016-02-01 11:02:37 +0530
committerKaleb KEITHLEY <kkeithle@redhat.com>2016-02-18 06:02:20 -0800
commit2cbbff904fee3ecb315f2c3229380dff3d483fde (patch)
tree9ddbf4ab52e03f8b18786164f39066713f15bf16
parent92d08cee31044af4b792ed283011bf7287b00883 (diff)
access-control : remove spurious error message from the posix_setxattr_cbk
A check for dictionary is required before calling handling_other_acl_related_xattr() in posix_setxattr_cbk(). Otherwise following message will be poped up on every settxattr call. [2016-01-31 17:38:48.027792] I [dict.c:473:dict_get] (-->/usr/lib/x86_64-linux-gnu/glusterfs/3.7.6/xlator/system/posix-acl.so (posix_acl_setxattr_cbk+0x26) [0x7f2334c5c166] --> /usr/lib/x86_64-linux-gnu/glusterfs/3.7.6/xlator/system/posix-acl.so (handling_other_acl_related_xattr+0xb0) [0x7f2334c5c0f0] -->/usr/lib/x86_64-linux-gnu/libglusterfs.so.0(dict_get+0x93) [0x7f233c04b0c3] ) 0-dict: !this || key=system.posix_acl_default [Invalid argument] Upstream reference : >Change-Id: I93f7e0f764c94dce38bdde95a68341f69a52122d >BUG: 1303501 >Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com> >Reviewed-on: http://review.gluster.org/13325 >Smoke: Gluster Build System <jenkins@build.gluster.com> >Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> >CentOS-regression: Gluster Build System <jenkins@build.gluster.com> >NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> >Reviewed-by: Jeff Darcy <jdarcy@redhat.com> >(cherry picked from commit b72172f4516ff5627f15168213a54b171463803f) BUG: 1308800 Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com> Change-Id: Ide2aea41c01c00bf28294fd3ea4f1d538f54b26f Reviewed-on: http://review.gluster.org/13452 Reviewed-by: Niels de Vos <ndevos@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
-rw-r--r--xlators/system/posix-acl/src/posix-acl.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/xlators/system/posix-acl/src/posix-acl.c b/xlators/system/posix-acl/src/posix-acl.c
index b1d3df396fb..6f6deec7d34 100644
--- a/xlators/system/posix-acl/src/posix-acl.c
+++ b/xlators/system/posix-acl/src/posix-acl.c
@@ -1945,10 +1945,12 @@ handling_other_acl_related_xattr (xlator_t *this, inode_t *inode, dict_t *xattr)
data_t *data = NULL;
int ret = 0;
+ if (!this || !xattr || !inode)
+ goto out;
+
data = dict_get (xattr, POSIX_ACL_ACCESS_XATTR);
if (data) {
-
acl = posix_acl_from_xattr (this, data->data, data->len);
if (!acl) {
ret = -1;