diff options
| author | wang.bo116@zte.com.cn <wang.bo116@zte.com.cn> | 2013-08-16 03:43:36 -0400 |
|---|---|---|
| committer | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2013-10-22 08:34:27 -0400 |
| commit | e71d1a59e757201454fd3cf66ddaceaf961bfb41 (patch) | |
| tree | 32c315efd213b14b171018a4ed7f6cffb7890124 | |
| parent | c23e9b75ccd0edba81a506c7d97e0af626489256 (diff) | |
UBIFS: remove unnecessary code in ubifs_garbage_collect
In ubifs_garbage_collect,local variable "space_before" calculate twice. In
fact, at the beginning of the loop, there is no need to calculate this
variable. Calculate it before call "ubifs_garbage_collect_leb" is enough. This
patch just remove the unnecessary calculate code.
Signed-off-by: wang bo <wang.bo116@zte.com.cn>
Acked-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
| -rw-r--r-- | fs/ubifs/gc.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/ubifs/gc.c b/fs/ubifs/gc.c index 76ca53cd3eee..9718da86ad01 100644 --- a/fs/ubifs/gc.c +++ b/fs/ubifs/gc.c | |||
| @@ -668,8 +668,7 @@ int ubifs_garbage_collect(struct ubifs_info *c, int anyway) | |||
| 668 | ubifs_assert(!wbuf->used); | 668 | ubifs_assert(!wbuf->used); |
| 669 | 669 | ||
| 670 | for (i = 0; ; i++) { | 670 | for (i = 0; ; i++) { |
| 671 | int space_before = c->leb_size - wbuf->offs - wbuf->used; | 671 | int space_before, space_after; |
| 672 | int space_after; | ||
| 673 | 672 | ||
| 674 | cond_resched(); | 673 | cond_resched(); |
| 675 | 674 | ||
