From b72172f4516ff5627f15168213a54b171463803f Mon Sep 17 00:00:00 2001 From: Jiffin Tony Thottan Date: Mon, 1 Feb 2016 11:02:37 +0530 Subject: 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] Change-Id: I93f7e0f764c94dce38bdde95a68341f69a52122d BUG: 1303501 Signed-off-by: Jiffin Tony Thottan Reviewed-on: http://review.gluster.org/13325 Smoke: Gluster Build System Reviewed-by: Kaleb KEITHLEY CentOS-regression: Gluster Build System NetBSD-regression: NetBSD Build System Reviewed-by: Jeff Darcy --- xlators/system/posix-acl/src/posix-acl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'xlators/system') diff --git a/xlators/system/posix-acl/src/posix-acl.c b/xlators/system/posix-acl/src/posix-acl.c index f4527c3b0c8..2edaa408135 100644 --- a/xlators/system/posix-acl/src/posix-acl.c +++ b/xlators/system/posix-acl/src/posix-acl.c @@ -1947,10 +1947,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; -- cgit