path: root/xlators/cluster/afr
diff options
authorBrian Foster <>2012-07-25 08:14:38 -0400
committerAnand Avati <>2012-07-25 15:03:57 -0700
commit34d395fc16449ec3fe709d77609677992752b61a (patch)
treec769688517edf133a66aba75d19c16a48a84ae42 /xlators/cluster/afr
parent75ee490213b7f7673970ef80dee3bcc567848c26 (diff)
cluster: fix crash on link of named pipe in stripe/replicate vol
A crash occurs when attempting to link a named pipe on a striped, replicated volume. The cause for this crash is attempting to deref a NULL inode pointer in stripe_link_cbk(). The RCA for this bug uncovered a couple of problems: - AFR ignores the inode pointer it receives on failure (returning NULL). - stripe assumes the inode pointer is valid on failure. Either one of these changes addresses the crash, but this patch includes both changes. AFR is modified to pass along the inode pointer it receives (which could still be NULL). stripe is modified to not assume the inode pointer is valid on fop failure. BUG: 842825 Change-Id: I9cb2cc918552620929c3ecbd69bc66d4635eafdc Signed-off-by: Brian Foster <> Reviewed-on: Tested-by: Gluster Build System <> Reviewed-by: Jeff Darcy <> Reviewed-by: Anand Avati <>
Diffstat (limited to 'xlators/cluster/afr')
1 files changed, 1 insertions, 2 deletions
diff --git a/xlators/cluster/afr/src/afr-dir-write.c b/xlators/cluster/afr/src/afr-dir-write.c
index 759fa058103..4d86fa4805e 100644
--- a/xlators/cluster/afr/src/afr-dir-write.c
+++ b/xlators/cluster/afr/src/afr-dir-write.c
@@ -875,13 +875,12 @@ afr_link_wind_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
local-> = *postparent;
- local-> = inode;
fresh_children = local->fresh_children;
fresh_children[local->success_count] = child_index;
+ local-> = inode;
local->op_errno = op_errno;
UNLOCK (&frame->lock);