UBIFS: slightly optimize write-buffer timer usage
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Tue, 23 Jun 2009 09:30:43 +0000 (12:30 +0300)
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Sun, 5 Jul 2009 16:09:35 +0000 (19:09 +0300)
commit36f9f01281975fe1e57a49c350da09b1b7ad382d
tree54b57b7b232e5cd44764d82b6c9f3c18a7829142
parent2be541b19763f45180d3c7bfbafe86096492fc95
UBIFS: slightly optimize write-buffer timer usage

This patch adds the following minor optimization:

1. If write-buffer does not use the timer, indicate it with the
   wbuf->no_timer variable, instead of using the wbuf->softlimit
   variable. This is better because wbuf->softlimit is of ktime_t
   type, and the ktime_to_ns function contains 64-bit multiplication.

2. Do not call the 'hrtimer_cancel()' function for write-buffers
   which do not use timers.

3. Do not cancel the timer in 'ubifs_put_super()' because the
   synchronization function does this.

This patch also removes a confusing comment.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
fs/ubifs/io.c
fs/ubifs/super.c
fs/ubifs/ubifs.h