diff options
Diffstat (limited to 'fs/ubifs/io.c')
-rw-r--r-- | fs/ubifs/io.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/fs/ubifs/io.c b/fs/ubifs/io.c index 2ef689a9a363..9fcf6c38c1bc 100644 --- a/fs/ubifs/io.c +++ b/fs/ubifs/io.c | |||
@@ -312,7 +312,7 @@ static void new_wbuf_timer_nolock(struct ubifs_wbuf *wbuf) | |||
312 | { | 312 | { |
313 | ubifs_assert(!hrtimer_active(&wbuf->timer)); | 313 | ubifs_assert(!hrtimer_active(&wbuf->timer)); |
314 | 314 | ||
315 | if (!ktime_to_ns(wbuf->softlimit)) | 315 | if (wbuf->no_timer) |
316 | return; | 316 | return; |
317 | dbg_io("set timer for jhead %d, %llu-%llu millisecs", wbuf->jhead, | 317 | dbg_io("set timer for jhead %d, %llu-%llu millisecs", wbuf->jhead, |
318 | ktime_to_ns(wbuf->softlimit)/USEC_PER_SEC, | 318 | ktime_to_ns(wbuf->softlimit)/USEC_PER_SEC, |
@@ -327,11 +327,8 @@ static void new_wbuf_timer_nolock(struct ubifs_wbuf *wbuf) | |||
327 | */ | 327 | */ |
328 | static void cancel_wbuf_timer_nolock(struct ubifs_wbuf *wbuf) | 328 | static void cancel_wbuf_timer_nolock(struct ubifs_wbuf *wbuf) |
329 | { | 329 | { |
330 | /* | 330 | if (wbuf->no_timer) |
331 | * If the syncer is waiting for the lock (from the background thread's | 331 | return; |
332 | * context) and another task is changing write-buffer then the syncing | ||
333 | * should be canceled. | ||
334 | */ | ||
335 | wbuf->need_sync = 0; | 332 | wbuf->need_sync = 0; |
336 | hrtimer_cancel(&wbuf->timer); | 333 | hrtimer_cancel(&wbuf->timer); |
337 | } | 334 | } |