diff options
author | Gu Zheng <guz.fnst@cn.fujitsu.com> | 2014-10-20 11:45:51 +0200 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2014-11-04 01:07:36 +0100 |
commit | 52aca07425088954384eb503d8e3442d81b9d18c (patch) | |
tree | 3c7b74a26719e99d1628994579585b04de11ff38 /fs/f2fs/segment.c | |
parent | f2fs: set raw_super default to NULL to avoid compile warning (diff) | |
download | linux-52aca07425088954384eb503d8e3442d81b9d18c.tar.xz linux-52aca07425088954384eb503d8e3442d81b9d18c.zip |
f2fs: rename f2fs_set/clear_bit to f2fs_test_and_set/clear_bit
Rename f2fs_set/clear_bit to f2fs_test_and_set/clear_bit, which mean
set/clear bit and return the old value, for better readability.
Signed-off-by: Gu Zheng <guz.fnst@cn.fujitsu.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/segment.c')
-rw-r--r-- | fs/f2fs/segment.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index 6b0850487aa2..19de23b119fa 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -648,10 +648,10 @@ static void update_sit_entry(struct f2fs_sb_info *sbi, block_t blkaddr, int del) /* Update valid block bitmap */ if (del > 0) { - if (f2fs_set_bit(offset, se->cur_valid_map)) + if (f2fs_test_and_set_bit(offset, se->cur_valid_map)) f2fs_bug_on(sbi, 1); } else { - if (!f2fs_clear_bit(offset, se->cur_valid_map)) + if (!f2fs_test_and_clear_bit(offset, se->cur_valid_map)) f2fs_bug_on(sbi, 1); } if (!f2fs_test_bit(offset, se->ckpt_valid_map)) |