diff options
author | Tao Ma <tao.ma@oracle.com> | 2010-04-06 10:46:46 +0200 |
---|---|---|
committer | Joel Becker <joel.becker@oracle.com> | 2010-05-06 03:18:09 +0200 |
commit | 3e4218df3176657be72ad2fa199779be6c11fe4f (patch) | |
tree | 99512a1b274e7e99af1b7fe9d388efce79399c20 /fs/ocfs2/localalloc.c | |
parent | ocfs2: make ocfs2_adjust_resv_from_alloc simple. (diff) | |
download | linux-3e4218df3176657be72ad2fa199779be6c11fe4f.tar.xz linux-3e4218df3176657be72ad2fa199779be6c11fe4f.zip |
ocfs2/trivial: Code cleanup for allocation reservation.
Two tiny cleanup for allocation reservation.
1. Remove some extra codes in ocfs2_local_alloc_find_clear_bits.
2. Remove an unuseful variables in ocfs2_find_resv_lhs.
Signed-off-by: Tao Ma <tao.ma@oracle.com>
Acked-by: Mark Fasheh <mfasheh@suse.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Diffstat (limited to 'fs/ocfs2/localalloc.c')
-rw-r--r-- | fs/ocfs2/localalloc.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/fs/ocfs2/localalloc.c b/fs/ocfs2/localalloc.c index 00022aac2e8c..63c41e206792 100644 --- a/fs/ocfs2/localalloc.c +++ b/fs/ocfs2/localalloc.c @@ -879,13 +879,10 @@ static int ocfs2_local_alloc_find_clear_bits(struct ocfs2_super *osb, mlog(0, "Exiting loop, bitoff = %d, numfound = %d\n", bitoff, numfound); - if (numfound == *numbits) { + if (numfound == *numbits) bitoff = startoff - numfound; - *numbits = numfound; - } else { - numfound = 0; + else bitoff = -1; - } bail: if (local_resv) |