summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorMohit Agrawal <moagrawal@redhat.com>2020-02-20 13:00:06 +0530
committerhari gowtham <hari.gowtham005@gmail.com>2020-02-27 08:20:46 +0000
commit922c41d2d001df4d447280620bec6a2c4cf63357 (patch)
treeea2e7d6987aeb9539cee8a915f54532753da184c /xlators
parent4989d01be1b3058fa4a32d8bb36e8c9150dc6a8b (diff)
lock: check null value of dict to avoid log flooding
> updates: bz#1712322 > Change-Id: I120a1d23506f9ebcf88c7ea2f2eff4978a61cf4a > Signed-off-by: Susant Palai <spalai@redhat.com> > (cherry picked from commit 2bb1807879493cb77ec9b5088485d88f13b84828) updates: bz#1797985 Change-Id: I120a1d23506f9ebcf88c7ea2f2eff4978a61cf4a Signed-off-by: Mohit Agrawal <moagrawal@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/features/locks/src/posix.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/features/locks/src/posix.c b/xlators/features/locks/src/posix.c
index 3f1c7a733ff..7217ec02232 100644
--- a/xlators/features/locks/src/posix.c
+++ b/xlators/features/locks/src/posix.c
@@ -121,7 +121,7 @@ fetch_pathinfo(xlator_t *, inode_t *, int32_t *, char **);
#define PL_CHECK_LOCK_ENFORCE_KEY(frame, dict, name, this, loc, fd, priv) \
do { \
- if (dict_get(dict, GF_ENFORCE_MANDATORY_LOCK) || \
+ if ((dict && (dict_get_sizen(dict, GF_ENFORCE_MANDATORY_LOCK))) || \
(name && (strcmp(name, GF_ENFORCE_MANDATORY_LOCK) == 0))) { \
inode_t *__inode = (loc ? loc->inode : fd->inode); \
pl_inode_t *__pl_inode = pl_inode_get(this, __inode, NULL); \