summaryrefslogtreecommitdiffstats
path: root/api/src/glfs-handleops.c
diff options
context:
space:
mode:
authorSoumya Koduri <skoduri@redhat.com>2015-07-10 11:23:07 +0530
committerKaleb KEITHLEY <kkeithle@redhat.com>2015-07-10 10:42:26 -0700
commit2992c18c1370ada476223b496e4e970d70cdd359 (patch)
tree7df2ec2afc8811edc7c77089946afbec4f06b214 /api/src/glfs-handleops.c
parent11ac70c8b6aefe3e82b7f1bd3f661206465c3ef8 (diff)
syncop: Include iatt to 'syncop_link' args
Include iatt to 'syncop_link' args to fetch proper attributes of the newly linked inode. Signed-off-by: Soumya Koduri <skoduri@redhat.com> Change-Id: If6b92961bd7a89add3791ed3a9b494087348b492 BUG: 1241788 Reviewed-on: http://review.gluster.org/11611 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Diffstat (limited to 'api/src/glfs-handleops.c')
-rw-r--r--api/src/glfs-handleops.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/api/src/glfs-handleops.c b/api/src/glfs-handleops.c
index 9a85f194451..2e552b763dc 100644
--- a/api/src/glfs-handleops.c
+++ b/api/src/glfs-handleops.c
@@ -1572,6 +1572,7 @@ pub_glfs_h_link (struct glfs *fs, struct glfs_object *linksrc,
inode_t *pinode = NULL;
loc_t oldloc = {0, };
loc_t newloc = {0, };
+ struct iatt iatt = {0, };
DECLARE_OLD_THIS;
@@ -1629,12 +1630,11 @@ pub_glfs_h_link (struct glfs *fs, struct glfs_object *linksrc,
newloc.inode = inode_ref (inode);
/* fop/op */
- ret = syncop_link (subvol, &oldloc, &newloc, NULL, NULL);
+ ret = syncop_link (subvol, &oldloc, &newloc, &iatt, NULL, NULL);
DECODE_SYNCOP_ERR (ret);
if (ret == 0)
- /* TODO: No iatt to pass as there has been no lookup */
- ret = glfs_loc_link (&newloc, NULL);
+ ret = glfs_loc_link (&newloc, &iatt);
out:
loc_wipe (&oldloc);
loc_wipe (&newloc);