summaryrefslogtreecommitdiffstats
path: root/xlators/performance/write-behind/src
diff options
context:
space:
mode:
authorvinayak hegde <vinayak@gluster.com>2009-10-12 09:09:33 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-10-13 04:53:15 -0700
commite84a3cf74947d7a6deace07a1726376aa0a8a6a4 (patch)
tree1f6e9190a9a70175c730a1569a47cafa9f36c7ff /xlators/performance/write-behind/src
parent6df45979aae89a217e43c59a8f0a8087915ce5d8 (diff)
performance/write-behind: file is referenced, without checking for NULL
Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 310 (While trying to create a file on replicate with write behind set-up, client crashes.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=310
Diffstat (limited to 'xlators/performance/write-behind/src')
-rw-r--r--xlators/performance/write-behind/src/write-behind.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/xlators/performance/write-behind/src/write-behind.c b/xlators/performance/write-behind/src/write-behind.c
index 4fa23a25fb4..5fbe1c06601 100644
--- a/xlators/performance/write-behind/src/write-behind.c
+++ b/xlators/performance/write-behind/src/write-behind.c
@@ -1725,7 +1725,7 @@ wb_process_queue (call_frame_t *frame, wb_file_t *file, char flush_all)
{
list_head_t winds, unwinds, other_requests;
size_t size = 0;
- wb_conf_t *conf = file->this->private;
+ wb_conf_t *conf = NULL;
uint32_t count = 0;
int32_t ret = -1;
@@ -1738,6 +1738,7 @@ wb_process_queue (call_frame_t *frame, wb_file_t *file, char flush_all)
goto out;
}
+ conf = file->this->private;
size = conf->aggregate_size;
LOCK (&file->lock);
{