diff options
| author | Amar Tumballi <amar@gluster.com> | 2009-03-21 19:04:15 -0700 | 
|---|---|---|
| committer | Anand V. Avati <avati@amp.gluster.com> | 2009-03-22 13:14:32 +0530 | 
| commit | 270621b34af7528755373e04b07f959c8dca274b (patch) | |
| tree | dca6da6564c10094f72d6e3e25b8a3528e29087b /xlators/performance/write-behind/src | |
| parent | 617fa2504283b63dde7f27186648ef9a9f060f52 (diff) | |
fixes crash in write-behind2.0.0rc6
in wb_flush, there was a chance that wb_process_queue()
was called with NULL frame, which causes crash.
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
Diffstat (limited to 'xlators/performance/write-behind/src')
| -rw-r--r-- | xlators/performance/write-behind/src/write-behind.c | 5 | 
1 files changed, 3 insertions, 2 deletions
diff --git a/xlators/performance/write-behind/src/write-behind.c b/xlators/performance/write-behind/src/write-behind.c index c41bf3d58e0..a0568de39c9 100644 --- a/xlators/performance/write-behind/src/write-behind.c +++ b/xlators/performance/write-behind/src/write-behind.c @@ -393,7 +393,7 @@ wb_sync (call_frame_t *frame, wb_file_t *file, list_head_t *winds)                  list_del_init (&request->winds);                  list_add_tail (&request->winds, &local->winds); -                if (!next +                if ((!next)                      || ((count + next->stub->args.writev.count) > MAX_VECTOR_COUNT))                  {                          sync_frame = copy_frame (frame);   @@ -1649,12 +1649,12 @@ wb_flush (call_frame_t *frame,                  return 0;          } +        process_frame = copy_frame (frame);          if (conf->flush_behind              && (!file->disabled) && (file->disable_till == 0)) {                  tmp_local = CALLOC (1, sizeof (*local));                  tmp_local->file = file; -                process_frame = copy_frame (frame);                  process_frame->local = tmp_local;          } @@ -1675,6 +1675,7 @@ wb_flush (call_frame_t *frame,                              FIRST_CHILD(this),                              FIRST_CHILD(this)->fops->flush,                              fd); +                STACK_DESTROY (process_frame->root);          }          return 0;  | 
