summaryrefslogtreecommitdiffstats
path: root/xlators/performance
diff options
context:
space:
mode:
authorAnand V. Avati <avati@gluster.com>2009-04-02 16:37:37 +0530
committerAnand V. Avati <avati@amp.gluster.com>2009-04-02 18:17:27 +0530
commitb91e83aa0d3891b4cd725b6044131096405dfba8 (patch)
treef3f36b5874cae1bd9b8d94c13b19d273559851c1 /xlators/performance
parentf2cdc5d10c56ef8010ab83acf31b3fb6c4c2fd1f (diff)
wb_flush - keep reference on fd for process_frame to perform STACK_WIND of flush.
This patch fixes bug report by Greg <greg@easyflirt.com> on gluster-users@ with subject 'glusterfsd crash' Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
Diffstat (limited to 'xlators/performance')
-rw-r--r--xlators/performance/write-behind/src/write-behind.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/xlators/performance/write-behind/src/write-behind.c b/xlators/performance/write-behind/src/write-behind.c
index a0568de39c9..dec64457215 100644
--- a/xlators/performance/write-behind/src/write-behind.c
+++ b/xlators/performance/write-behind/src/write-behind.c
@@ -1658,6 +1658,8 @@ wb_flush (call_frame_t *frame,
process_frame->local = tmp_local;
}
+ fd_ref (fd);
+
wb_enqueue (file, stub);
wb_process_queue (process_frame, file, 1);
@@ -1678,6 +1680,8 @@ wb_flush (call_frame_t *frame,
STACK_DESTROY (process_frame->root);
}
+ fd_unref (fd);
+
return 0;
}