summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
Diffstat (limited to 'xlators')
-rw-r--r--xlators/cluster/dht/src/dht-helper.c12
-rw-r--r--xlators/mount/fuse/src/fuse-bridge.c1
2 files changed, 6 insertions, 7 deletions
diff --git a/xlators/cluster/dht/src/dht-helper.c b/xlators/cluster/dht/src/dht-helper.c
index 8a38de475d9..c587daca7b2 100644
--- a/xlators/cluster/dht/src/dht-helper.c
+++ b/xlators/cluster/dht/src/dht-helper.c
@@ -627,6 +627,9 @@ dht_migration_complete_check_task (void *data)
src_node = local->cached_subvol;
+ if (!local->loc.inode && !local->fd)
+ goto out;
+
/* getxattr on cached_subvol for 'linkto' value */
if (!local->loc.inode)
ret = syncop_fgetxattr (src_node, local->fd, &dict,
@@ -719,9 +722,6 @@ dht_migration_complete_check_task (void *data)
local->cached_subvol = dst_node;
ret = 0;
- if (!local->fd)
- goto out;
-
/* once we detect the migration complete, the fd-ctx is no more
required.. delete the ctx, and do one extra 'fd_unref' for open fd */
ret = fd_ctx_del (local->fd, this, NULL);
@@ -805,6 +805,9 @@ dht_rebalance_inprogress_task (void *data)
src_node = local->cached_subvol;
+ if (!local->loc.inode && !local->fd)
+ goto out;
+
/* getxattr on cached_subvol for 'linkto' value */
if (local->loc.inode)
ret = syncop_getxattr (src_node, &local->loc, &dict,
@@ -853,9 +856,6 @@ dht_rebalance_inprogress_task (void *data)
ret = 0;
- if (!local->fd)
- goto out;
-
if (local->loc.inode) {
ret = syncop_open (dst_node, &local->loc,
local->fd->flags, local->fd);
diff --git a/xlators/mount/fuse/src/fuse-bridge.c b/xlators/mount/fuse/src/fuse-bridge.c
index 875abbe1db1..65df671305b 100644
--- a/xlators/mount/fuse/src/fuse-bridge.c
+++ b/xlators/mount/fuse/src/fuse-bridge.c
@@ -3819,7 +3819,6 @@ fuse_migrate_fd_open (xlator_t *this, fd_t *basefd, fd_t *oldfd,
out:
loc_wipe (&loc);
- fd_unref (newfd);
return ret;
}