aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk.kim@samsung.com>2014-03-18 12:33:06 +0900
committerAndreas Blaesius <skate4life@gmx.de>2016-06-05 21:21:21 +0200
commit1cd5cb533a4d90c2fd3725888d63b262c8bb4f6f (patch)
tree7ac7efaff5787a08a5c112eff3de7272280f7169 /fs
parent144ad092deb5e0c5454f9486284b4a2278c20ca7 (diff)
downloadkernel_samsung_espresso10-1cd5cb533a4d90c2fd3725888d63b262c8bb4f6f.zip
kernel_samsung_espresso10-1cd5cb533a4d90c2fd3725888d63b262c8bb4f6f.tar.gz
kernel_samsung_espresso10-1cd5cb533a4d90c2fd3725888d63b262c8bb4f6f.tar.bz2
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')
-rw-r--r--fs/f2fs/checkpoint.c2
-rw-r--r--fs/f2fs/f2fs.h5
-rw-r--r--fs/f2fs/inode.c2
3 files changed, 7 insertions, 2 deletions
diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c
index c3888c5..bd711c3 100644
--- a/fs/f2fs/checkpoint.c
+++ b/fs/f2fs/checkpoint.c
@@ -618,7 +618,7 @@ void remove_dirty_dir_inode(struct inode *inode)
return;
spin_lock(&sbi->dir_inode_lock);
- if (atomic_read(&F2FS_I(inode)->dirty_dents)) {
+ if (get_dirty_dents(inode)) {
spin_unlock(&sbi->dir_inode_lock);
return;
}
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index ef3592e..0104415 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 *
diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c
index 439db5e..55c3074 100644
--- a/fs/f2fs/inode.c
+++ b/fs/f2fs/inode.c
@@ -273,7 +273,7 @@ void f2fs_evict_inode(struct inode *inode)
inode->i_ino == F2FS_META_INO(sbi))
goto no_delete;
- f2fs_bug_on(atomic_read(&F2FS_I(inode)->dirty_dents));
+ f2fs_bug_on(get_dirty_dents(inode));
remove_dirty_dir_inode(inode);
if (inode->i_nlink || is_bad_inode(inode))