UPSTREAM: f2fs: clean up unnecessary indentation
No functional change. Reviewed-by: Chao Yu <chao@kernel.org> Change-Id: I318bcdbbdde5393d671966614e76d6e988ba47ef Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> (cherry picked from commit 05d3273ad03fa5ea1177b4f3dfeeb6de4899b504)
This commit is contained in:
+23
-15
@@ -429,7 +429,6 @@ static inline void __set_free(struct f2fs_sb_info *sbi, unsigned int segno)
|
|||||||
unsigned int secno = GET_SEC_FROM_SEG(sbi, segno);
|
unsigned int secno = GET_SEC_FROM_SEG(sbi, segno);
|
||||||
unsigned int start_segno = GET_SEG_FROM_SEC(sbi, secno);
|
unsigned int start_segno = GET_SEG_FROM_SEC(sbi, secno);
|
||||||
unsigned int next;
|
unsigned int next;
|
||||||
unsigned int usable_segs = f2fs_usable_segs_in_sec(sbi);
|
|
||||||
|
|
||||||
spin_lock(&free_i->segmap_lock);
|
spin_lock(&free_i->segmap_lock);
|
||||||
clear_bit(segno, free_i->free_segmap);
|
clear_bit(segno, free_i->free_segmap);
|
||||||
@@ -437,7 +436,7 @@ static inline void __set_free(struct f2fs_sb_info *sbi, unsigned int segno)
|
|||||||
|
|
||||||
next = find_next_bit(free_i->free_segmap,
|
next = find_next_bit(free_i->free_segmap,
|
||||||
start_segno + SEGS_PER_SEC(sbi), start_segno);
|
start_segno + SEGS_PER_SEC(sbi), start_segno);
|
||||||
if (next >= start_segno + usable_segs) {
|
if (next >= start_segno + f2fs_usable_segs_in_sec(sbi)) {
|
||||||
clear_bit(secno, free_i->free_secmap);
|
clear_bit(secno, free_i->free_secmap);
|
||||||
free_i->free_sections++;
|
free_i->free_sections++;
|
||||||
}
|
}
|
||||||
@@ -463,22 +462,31 @@ static inline void __set_test_and_free(struct f2fs_sb_info *sbi,
|
|||||||
unsigned int secno = GET_SEC_FROM_SEG(sbi, segno);
|
unsigned int secno = GET_SEC_FROM_SEG(sbi, segno);
|
||||||
unsigned int start_segno = GET_SEG_FROM_SEC(sbi, secno);
|
unsigned int start_segno = GET_SEG_FROM_SEC(sbi, secno);
|
||||||
unsigned int next;
|
unsigned int next;
|
||||||
unsigned int usable_segs = f2fs_usable_segs_in_sec(sbi);
|
bool ret;
|
||||||
|
|
||||||
spin_lock(&free_i->segmap_lock);
|
spin_lock(&free_i->segmap_lock);
|
||||||
if (test_and_clear_bit(segno, free_i->free_segmap)) {
|
ret = test_and_clear_bit(segno, free_i->free_segmap);
|
||||||
free_i->free_segments++;
|
if (!ret)
|
||||||
|
goto unlock_out;
|
||||||
|
|
||||||
if (!inmem && IS_CURSEC(sbi, secno))
|
free_i->free_segments++;
|
||||||
goto skip_free;
|
|
||||||
next = find_next_bit(free_i->free_segmap,
|
if (!inmem && IS_CURSEC(sbi, secno))
|
||||||
start_segno + SEGS_PER_SEC(sbi), start_segno);
|
goto unlock_out;
|
||||||
if (next >= start_segno + usable_segs) {
|
|
||||||
if (test_and_clear_bit(secno, free_i->free_secmap))
|
/* check large section */
|
||||||
free_i->free_sections++;
|
next = find_next_bit(free_i->free_segmap,
|
||||||
}
|
start_segno + SEGS_PER_SEC(sbi), start_segno);
|
||||||
}
|
if (next < start_segno + f2fs_usable_segs_in_sec(sbi))
|
||||||
skip_free:
|
goto unlock_out;
|
||||||
|
|
||||||
|
ret = test_and_clear_bit(secno, free_i->free_secmap);
|
||||||
|
if (!ret)
|
||||||
|
goto unlock_out;
|
||||||
|
|
||||||
|
free_i->free_sections++;
|
||||||
|
|
||||||
|
unlock_out:
|
||||||
spin_unlock(&free_i->segmap_lock);
|
spin_unlock(&free_i->segmap_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user