From 09da0f0870dbb79d6e6dfddbfa452152c510d467 Mon Sep 17 00:00:00 2001 From: Soumya Koduri Date: Fri, 10 Jul 2015 11:23:07 +0530 Subject: syncop: Include iatt to 'syncop_link' args Include iatt to 'syncop_link' args to fetch proper attributes of the newly linked inode. This is backport of the below fix - http://review.gluster.org/11611 Change-Id: If6b92961bd7a89add3791ed3a9b494087348b492 BUG: 1243408 Reviewed-on: http://review.gluster.org/11611 Reviewed-by: Shyamsundar Ranganathan Reviewed-by: Kaleb KEITHLEY Signed-off-by: Soumya Koduri Reviewed-on: http://review.gluster.org/11677 Tested-by: Gluster Build System --- xlators/cluster/afr/src/afr-self-heal-entry.c | 2 +- xlators/cluster/dht/src/dht-rebalance.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'xlators') diff --git a/xlators/cluster/afr/src/afr-self-heal-entry.c b/xlators/cluster/afr/src/afr-self-heal-entry.c index 13a280fa66c..146c743c67d 100644 --- a/xlators/cluster/afr/src/afr-self-heal-entry.c +++ b/xlators/cluster/afr/src/afr-self-heal-entry.c @@ -131,7 +131,7 @@ afr_selfheal_recreate_entry (xlator_t *this, int dst, int source, inode_t *dir, ret = syncop_lookup (priv->children[dst], &srcloc, 0, 0, 0, 0); if (ret == 0) { ret = syncop_link (priv->children[dst], &srcloc, &loc, - NULL, NULL); + &newent, NULL, NULL); } else { ret = syncop_readlink (priv->children[source], &srcloc, &linkname, 4096, NULL, NULL); diff --git a/xlators/cluster/dht/src/dht-rebalance.c b/xlators/cluster/dht/src/dht-rebalance.c index 39c1647d364..4db6134b8f9 100644 --- a/xlators/cluster/dht/src/dht-rebalance.c +++ b/xlators/cluster/dht/src/dht-rebalance.c @@ -319,7 +319,7 @@ gf_defrag_handle_hardlink (xlator_t *this, loc_t *loc, dict_t *xattrs, hashed_subvol = linkto_subvol; } - ret = syncop_link (hashed_subvol, loc, loc, NULL, NULL); + ret = syncop_link (hashed_subvol, loc, loc, &iatt, NULL, NULL); if (ret) { op_errno = -ret; ret = -1; -- cgit