summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/dht/src/dht-common.h
diff options
context:
space:
mode:
authorN Balachandran <nbalacha@redhat.com>2018-02-02 12:35:16 +0530
committerN Balachandran <nbalacha@redhat.com>2018-02-07 06:24:57 +0000
commit187e8e8d879675048b1b133e5eb8a06ad3cc6f2a (patch)
treea87a4cd0fe9e2726b5971d0fb7d4fbbe58265142 /xlators/cluster/dht/src/dht-common.h
parente19b3354a173b3e4d652a9aca5cc066eccc08332 (diff)
cluster/dht: Fixed leak in dht_populate_inode_for_dentry
Fixed an issue in dht_populate_inode_for_dentry where a layout is set in the inode without checking if it is already set. This overwrites the value each time without freeing the already existing layout. Also includes the changes in https://review.gluster.org/19471 > Change-Id: I651bf539a0b82b4ddc4c355890c16a8e91f5f1fd > BUG: 1541264 > Signed-off-by: N Balachandran <nbalacha@redhat.com> Change-Id: I651bf539a0b82b4ddc4c355890c16a8e91f5f1fd BUG: 1541267 Signed-off-by: N Balachandran <nbalacha@redhat.com>
Diffstat (limited to 'xlators/cluster/dht/src/dht-common.h')
-rw-r--r--xlators/cluster/dht/src/dht-common.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/cluster/dht/src/dht-common.h b/xlators/cluster/dht/src/dht-common.h
index 7c6b1191048..9e7e12a51ca 100644
--- a/xlators/cluster/dht/src/dht-common.h
+++ b/xlators/cluster/dht/src/dht-common.h
@@ -731,7 +731,7 @@ typedef struct dht_fd_ctx {
#define ENTRY_MISSING(op_ret, op_errno) (op_ret == -1 && op_errno == ENOENT)
-#define is_revalidate(loc) (dht_inode_ctx_layout_get (loc->inode, this, NULL) == 0)
+#define is_revalidate(loc) (dht_inode_ctx_layout_get ((loc)->inode, this, NULL) == 0)
#define is_last_call(cnt) (cnt == 0)