diff options
Diffstat (limited to 'xlators/cluster/dht/src')
| -rw-r--r-- | xlators/cluster/dht/src/dht-helper.c | 2 | ||||
| -rw-r--r-- | xlators/cluster/dht/src/dht-inode-write.c | 2 | 
2 files changed, 3 insertions, 1 deletions
diff --git a/xlators/cluster/dht/src/dht-helper.c b/xlators/cluster/dht/src/dht-helper.c index 56c139aa9..23fc1ff96 100644 --- a/xlators/cluster/dht/src/dht-helper.c +++ b/xlators/cluster/dht/src/dht-helper.c @@ -806,6 +806,8 @@ 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 */          ret = fd_ctx_del (local->fd, this, NULL); diff --git a/xlators/cluster/dht/src/dht-inode-write.c b/xlators/cluster/dht/src/dht-inode-write.c index b23434cdf..b87d2f732 100644 --- a/xlators/cluster/dht/src/dht-inode-write.c +++ b/xlators/cluster/dht/src/dht-inode-write.c @@ -212,7 +212,7 @@ dht_truncate_cbk (call_frame_t *frame, void *cookie, xlator_t *this,                  dht_iatt_merge (this, &local->stbuf, postbuf, NULL);                  dht_iatt_merge (this, &local->prebuf, prebuf, NULL);                  ret = fd_ctx_get (local->fd, this, NULL); -                if (!ret) { +                if (!ret || !local->fd) {                          dht_truncate2 (this, frame, 0);                          return 0;                  }  | 
