f2fs: use inner macro and function to clean up codes