summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src/afr-self-heal-entry.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/cluster/afr/src/afr-self-heal-entry.c')
-rw-r--r--xlators/cluster/afr/src/afr-self-heal-entry.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/xlators/cluster/afr/src/afr-self-heal-entry.c b/xlators/cluster/afr/src/afr-self-heal-entry.c
index e32b50763..21b248f49 100644
--- a/xlators/cluster/afr/src/afr-self-heal-entry.c
+++ b/xlators/cluster/afr/src/afr-self-heal-entry.c
@@ -1097,14 +1097,19 @@ afr_sh_entry_impunge_newfile_cbk (call_frame_t *impunge_frame, void *cookie,
gf_log (this->name, GF_LOG_ERROR, "Out of memory");
goto out;
}
+ /* Pending data xattrs shouldn't be set for special files
+ */
idx = afr_index_for_transaction_type (AFR_METADATA_TRANSACTION);
pending_array[idx] = hton32 (1);
if (IA_ISDIR (stbuf->ia_type))
idx = afr_index_for_transaction_type (AFR_ENTRY_TRANSACTION);
- else
+ else if (IA_ISREG (stbuf->ia_type))
idx = afr_index_for_transaction_type (AFR_DATA_TRANSACTION);
+ else
+ goto cont;
pending_array[idx] = hton32 (1);
+cont:
ret = dict_set_dynptr (xattr, priv->pending_key[child_index],
pending_array, 3 * sizeof (int32_t));
if (ret < 0) {