summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/f2fs.h
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk.kim@samsung.com>2014-03-18 04:33:06 +0100
committerJaegeuk Kim <jaegeuk.kim@samsung.com>2014-03-18 04:34:30 +0100
commitf8b2c1f940dca2843fe13b55ba5868bac8040551 (patch)
tree3ef6e0fb1b088148800c74343ab8a02264b073ba /fs/f2fs/f2fs.h
parentf2fs: fix incorrect parsing with option string (diff)
downloadlinux-f8b2c1f940dca2843fe13b55ba5868bac8040551.tar.xz
linux-f8b2c1f940dca2843fe13b55ba5868bac8040551.zip
f2fs: introduce get_dirty_dents for readability
The get_dirty_dents gives us the number of dirty dentry pages. Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs/f2fs.h')
-rw-r--r--fs/f2fs/f2fs.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index 292cc3c25b28..59fac1a9f0c2 100644
--- a/fs/f2fs/f2fs.h
+++ b/fs/f2fs/f2fs.h
@@ -704,6 +704,11 @@ static inline int get_pages(struct f2fs_sb_info *sbi, int count_type)
return atomic_read(&sbi->nr_pages[count_type]);
}
+static inline int get_dirty_dents(struct inode *inode)
+{
+ return atomic_read(&F2FS_I(inode)->dirty_dents);
+}
+
static inline int get_blocktype_secs(struct f2fs_sb_info *sbi, int block_type)
{
unsigned int pages_per_sec = sbi->segs_per_sec *