summaryrefslogtreecommitdiffstats
path: root/api/src/glfs-handleops.c
diff options
context:
space:
mode:
authorSoumya Koduri <skoduri@redhat.com>2015-07-08 12:08:25 +0530
committerKaleb KEITHLEY <kkeithle@redhat.com>2015-07-09 11:04:35 -0700
commitc134bdd83a781452eff8c3e4abce3da4a997daa8 (patch)
treee7d67a9fdf8245d27836d46c0b7d3a97727de200 /api/src/glfs-handleops.c
parentea7161bca1c9e0c91148fea8895041a08ed24830 (diff)
gfapi: Update loc->inode accordingly in 'glfs_loc_link'
In case if the inode already exits in the cache, inode_link returns the pointer to the exiting one instead of using loc->inode. This will result in issues if that invalid inodei(loc->inode) is referenced further. Fixed the same. Change-Id: I7d4a06043e4e731c8404532c47d482175dc2c277 BUG: 1240916 Signed-off-by: Soumya Koduri <skoduri@redhat.com> Reviewed-on: http://review.gluster.org/11572 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
Diffstat (limited to 'api/src/glfs-handleops.c')
-rw-r--r--api/src/glfs-handleops.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/api/src/glfs-handleops.c b/api/src/glfs-handleops.c
index 47f2139c140..9a85f194451 100644
--- a/api/src/glfs-handleops.c
+++ b/api/src/glfs-handleops.c
@@ -746,11 +746,6 @@ pub_glfs_h_creat (struct glfs *fs, struct glfs_object *parent, const char *path,
/* populate out args */
if (ret == 0) {
- /* TODO: If the inode existed in the cache (say file already
- exists), then the glfs_loc_link will not update the
- loc.inode, as a result we will have a 0000 GFID that we
- would copy out to the object, this needs to be fixed.
- */
ret = glfs_loc_link (&loc, &iatt);
if (ret != 0) {
goto out;
@@ -1466,11 +1461,6 @@ pub_glfs_h_symlink (struct glfs *fs, struct glfs_object *parent,
/* populate out args */
if (ret == 0) {
- /* TODO: If the inode existed in the cache (say file already
- * exists), then the glfs_loc_link will not update the
- * loc.inode, as a result we will have a 0000 GFID that we
- * would copy out to the object, this needs to be fixed.
- */
ret = glfs_loc_link (&loc, &iatt);
if (ret != 0) {
goto out;