diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2015-04-23 19:27:21 +0200 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2015-05-29 00:41:32 +0200 |
commit | 01b960e94a58d91518d5dd7001c5cd0c57335251 (patch) | |
tree | 614a05a74202da862fa25f4def79d36404807545 /fs/f2fs/inline.c | |
parent | f2fs: clean up f2fs_lookup (diff) | |
download | linux-01b960e94a58d91518d5dd7001c5cd0c57335251.tar.xz linux-01b960e94a58d91518d5dd7001c5cd0c57335251.zip |
f2fs: add f2fs_may_inline_{data, dentry}
This patch adds f2fs_may_inline_data and f2fs_may_inline_dentry.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/inline.c')
-rw-r--r-- | fs/f2fs/inline.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/fs/f2fs/inline.c b/fs/f2fs/inline.c index 8140e4f0e538..99d514815af7 100644 --- a/fs/f2fs/inline.c +++ b/fs/f2fs/inline.c @@ -13,7 +13,7 @@ #include "f2fs.h" -bool f2fs_may_inline(struct inode *inode) +bool f2fs_may_inline_data(struct inode *inode) { if (!test_opt(F2FS_I_SB(inode), INLINE_DATA)) return false; @@ -30,6 +30,17 @@ bool f2fs_may_inline(struct inode *inode) return true; } +bool f2fs_may_inline_dentry(struct inode *inode) +{ + if (!test_opt(F2FS_I_SB(inode), INLINE_DENTRY)) + return false; + + if (!S_ISDIR(inode->i_mode)) + return false; + + return true; +} + void read_inline_data(struct page *page, struct page *ipage) { void *src_addr, *dst_addr; |