diff options
author | zhong jiang <zhongjiang@huawei.com> | 2018-12-28 03:32:43 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-12-28 15:11:45 -0500 |
commit | dec5b0d4a99f5d4be02461ac0c7f62904509b88b (patch) | |
tree | c517dbf1190011dcb27b575b38ccb57c3aeef7c4 /fs | |
parent | cb6a8fd7a6bfa0999f726a9cdb506b3345d937b6 (diff) |
ocfs2: remove set but not used variable 'lastzero'
lastzero is not used after setting its value. It is safe to remove the
unused variable.
Link: http://lkml.kernel.org/r/1540296942-24533-1-git-send-email-zhongjiang@huawei.com
Signed-off-by: zhong jiang <zhongjiang@huawei.com>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Mark Fasheh <mark@fasheh.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Junxiao Bi <junxiao.bi@oracle.com>
Cc: Joseph Qi <jiangqi903@gmail.com>
Cc: Changwei Ge <ge.changwei@h3c.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ocfs2/localalloc.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/ocfs2/localalloc.c b/fs/ocfs2/localalloc.c index 7642b6712c39..308f05be107c 100644 --- a/fs/ocfs2/localalloc.c +++ b/fs/ocfs2/localalloc.c | |||
@@ -835,7 +835,7 @@ static int ocfs2_local_alloc_find_clear_bits(struct ocfs2_super *osb, | |||
835 | u32 *numbits, | 835 | u32 *numbits, |
836 | struct ocfs2_alloc_reservation *resv) | 836 | struct ocfs2_alloc_reservation *resv) |
837 | { | 837 | { |
838 | int numfound = 0, bitoff, left, startoff, lastzero; | 838 | int numfound = 0, bitoff, left, startoff; |
839 | int local_resv = 0; | 839 | int local_resv = 0; |
840 | struct ocfs2_alloc_reservation r; | 840 | struct ocfs2_alloc_reservation r; |
841 | void *bitmap = NULL; | 841 | void *bitmap = NULL; |
@@ -873,7 +873,6 @@ static int ocfs2_local_alloc_find_clear_bits(struct ocfs2_super *osb, | |||
873 | bitmap = OCFS2_LOCAL_ALLOC(alloc)->la_bitmap; | 873 | bitmap = OCFS2_LOCAL_ALLOC(alloc)->la_bitmap; |
874 | 874 | ||
875 | numfound = bitoff = startoff = 0; | 875 | numfound = bitoff = startoff = 0; |
876 | lastzero = -1; | ||
877 | left = le32_to_cpu(alloc->id1.bitmap1.i_total); | 876 | left = le32_to_cpu(alloc->id1.bitmap1.i_total); |
878 | while ((bitoff = ocfs2_find_next_zero_bit(bitmap, left, startoff)) != -1) { | 877 | while ((bitoff = ocfs2_find_next_zero_bit(bitmap, left, startoff)) != -1) { |
879 | if (bitoff == left) { | 878 | if (bitoff == left) { |