[f2fs-dev] [PATCH 1/3] f2fs:remove unnecessary condition judgment

2015-03-07 Thread Yuan Zhong
Remove the unnecessary condition judgment, because 'max_slots' has been initialized to '0' at the beginging of the function, as following: if (max_slots) max_len = 0; Signed-off-by: Yuan Zhong --- fs/f2fs/dir.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --gi

[f2fs-dev] [PATCH 2/3] f2fs:set the correct place of initializing *res_page

2015-03-07 Thread Yuan Zhong
The function 'find_in_inline_dir()' contain 'res_page' as an argument. So, we should initiaize 'res_page' before this function. Signed-off-by: Yuan Zhong --- fs/f2fs/dir.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/f2fs/dir.c b/fs/f2fs/dir.c index 590a

[f2fs-dev] [PATCH 3/3] f2fs:use enum dentrt_ptr type to replace constant use

2015-03-07 Thread Yuan Zhong
The function make_dentry_ptr has an argument 'int type'. This argument is used to distinguish 'block dentry' and 'inline dentry'. We used 1 and 2 as the type. To make code more readable, we use enum type to replace constant use. Signed-off-by: Yuan Zhong --- fs/f2fs/dir.c|8