diff options
Diffstat (limited to 'xlators/performance/write-behind/src/write-behind.c')
| -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 2405c24e517..132b6f53bf3 100644 --- a/xlators/performance/write-behind/src/write-behind.c +++ b/xlators/performance/write-behind/src/write-behind.c @@ -962,6 +962,7 @@ __wb_fulfill_short_write (wb_request_t *req, int size, gf_boolean_t *fulfilled)          } else {                  accounted_size = size;                  __wb_modify_write_request (req, size); +                *fulfilled = 0;          }  out: @@ -1003,7 +1004,7 @@ wb_fulfill_short_write (wb_request_t *head, int size)                  size -= accounted_size;                  if (size == 0) { -                        if (fulfilled) +                        if (fulfilled && (next != head))                                  req = next;                          goto done; @@ -1015,7 +1016,7 @@ wb_fulfill_short_write (wb_request_t *head, int size)                          size -= accounted_size;                          if (size == 0) { -                                if (fulfilled) +                                if (fulfilled && (next != head))                                          req = next;                                  break;                          }  | 
