[f2fs-dev] [PATCH 4/6] f2fs: rename f2fs_set/clear_bit to f2fs_test_and_set/clear_bit

2014-10-20 Thread Gu Zheng
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 --- fs/f2fs/f2fs.h|4 ++-- fs/f2fs/segment.c |4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/f2fs/f2

[f2fs-dev] [PATCH 3/6] f2fs: introduce f2fs_change_bit to simplify the change bit logic

2014-10-20 Thread Gu Zheng
Introduce f2fs_change_bit to simplify the change bit logic in function set_to_next_nat{sit}. Signed-off-by: Gu Zheng --- fs/f2fs/f2fs.h|9 + fs/f2fs/node.h|5 + fs/f2fs/segment.h |5 + 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/fs/f2fs/f2f

[f2fs-dev] [PATCH 1/6] f2fs: remove the seems unneeded argument 'type' from __get_victim

2014-10-20 Thread Gu Zheng
Remove the unneeded argument 'type' from __get_victim, use NO_CHECK_TYPE directly when calling v_ops->get_victim(). Signed-off-by: Gu Zheng --- fs/f2fs/gc.c |8 +--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index 2a8f4ac..7151d7d 100644 -

[f2fs-dev] [PATCH 2/6] f2fs: use current_sit_addr to replace the open code

2014-10-20 Thread Gu Zheng
Signed-off-by: Gu Zheng --- fs/f2fs/segment.c | 12 +--- 1 files changed, 1 insertions(+), 11 deletions(-) diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index 923cb76..6fb7446 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -1524,17 +1524,7 @@ int lookup_journal_in_cursu

[f2fs-dev] [PATCH 6/6] f2fs: set raw_super default to NULL to avoid compile warning

2014-10-20 Thread Gu Zheng
Set raw_super default to NULL to avoid the possibly used uninitialized warning, though we may never hit it in fact. Signed-off-by: Gu Zheng --- fs/f2fs/super.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index 41d6f70..ed59c8e 10064

[f2fs-dev] [PATCH 5/6] f2fs: remove the redundant function cond_clear_inode_flag

2014-10-20 Thread Gu Zheng
Use clear_inode_flag to replace the redundant cond_clear_inode_flag. Signed-off-by: Gu Zheng --- fs/f2fs/acl.c |4 ++-- fs/f2fs/f2fs.h |9 - 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/fs/f2fs/acl.c b/fs/f2fs/acl.c index 83b9b5a..e8d78fb 100644 --- a/fs/f2fs/