From 9486ba442b00a6b227bfe0d66b0f4dbcd1a2ee91 Mon Sep 17 00:00:00 2001 From: Jaegeuk Kim Date: Fri, 21 Nov 2014 16:36:28 -0800 Subject: f2fs: introduce f2fs_dentry_kunmap to clean up This patch introduces f2fs_dentry_kunmap to clean up dirty codes. Signed-off-by: Jaegeuk Kim --- fs/f2fs/f2fs.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'fs/f2fs/f2fs.h') diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index 418c8524a164..d04281319dbe 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h @@ -1229,6 +1229,12 @@ static inline void *inline_dentry_addr(struct page *page) return (void *)&(ri->i_addr[1]); } +static inline void f2fs_dentry_kunmap(struct inode *dir, struct page *page) +{ + if (!f2fs_has_inline_dentry(dir)) + kunmap(page); +} + static inline int f2fs_readonly(struct super_block *sb) { return sb->s_flags & MS_RDONLY; -- cgit v1.2.3