diff options
| -rw-r--r-- | xlators/cluster/dht/src/tier-common.c | 6 | ||||
| -rw-r--r-- | xlators/storage/posix/src/posix.c | 3 | 
2 files changed, 7 insertions, 2 deletions
diff --git a/xlators/cluster/dht/src/tier-common.c b/xlators/cluster/dht/src/tier-common.c index 40c8c9e965d..8de21df24ef 100644 --- a/xlators/cluster/dht/src/tier-common.c +++ b/xlators/cluster/dht/src/tier-common.c @@ -537,12 +537,16 @@ tier_unlink (call_frame_t *frame, xlator_t *this, loc_t *loc, int xflag,          }          local->flags = xflag; -        if (hashed_subvol == cached_subvol) { +        if (IA_ISREG (loc->inode->ia_type) && +            (hashed_subvol == cached_subvol)) {                  /*                   * File resides in cold tier. We need to stat                   * the file to see if it is being promoted.                   * If yes we need to delete the destination                   * file as well. +                 * +                 * Currently we are doing this check only for +                 * regular files.                   */                  xdata = xdata ? dict_ref (xdata) : dict_new ();                  if (xdata) { diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c index a3e0aa26bf8..272d08f8654 100644 --- a/xlators/storage/posix/src/posix.c +++ b/xlators/storage/posix/src/posix.c @@ -1749,7 +1749,8 @@ posix_unlink (call_frame_t *frame, xlator_t *this,                  goto out;          } -        if (xdata && dict_get (xdata, DHT_IATT_IN_XDATA_KEY)) { +        if (IA_ISREG (loc->inode->ia_type) && +            xdata && dict_get (xdata, DHT_IATT_IN_XDATA_KEY)) {                  fdstat_requested = 1;          }  | 
