From b91e83aa0d3891b4cd725b6044131096405dfba8 Mon Sep 17 00:00:00 2001 From: "Anand V. Avati" Date: Thu, 2 Apr 2009 16:37:37 +0530 Subject: wb_flush - keep reference on fd for process_frame to perform STACK_WIND of flush. This patch fixes bug report by Greg on gluster-users@ with subject 'glusterfsd crash' Signed-off-by: Anand V. Avati --- xlators/performance/write-behind/src/write-behind.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'xlators/performance/write-behind') diff --git a/xlators/performance/write-behind/src/write-behind.c b/xlators/performance/write-behind/src/write-behind.c index a0568de39..dec644572 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; } -- cgit