summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/super.c
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2016-12-02 15:11:32 -0800
committerJaegeuk Kim <jaegeuk@kernel.org>2016-12-05 11:43:59 -0800
commit204706c7accfabb67b97eef9f9a28361b6201199 (patch)
treeeeb5defa3ec3abd03c4eceb2fde04315a406dc09 /fs/f2fs/super.c
parent0002b61bdaac732bcff364a18f5bd57c95def0a5 (diff)
downloadtalos-obmc-linux-204706c7accfabb67b97eef9f9a28361b6201199.tar.gz
talos-obmc-linux-204706c7accfabb67b97eef9f9a28361b6201199.zip
Revert "f2fs: use percpu_counter for # of dirty pages in inode"
This reverts commit 1beba1b3a953107c3ff5448ab4e4297db4619c76. The perpcu_counter doesn't provide atomicity in single core and consume more DRAM. That incurs fs_mark test failure due to ENOMEM. Cc: stable@vger.kernel.org # 4.7+ Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/super.c')
-rw-r--r--fs/f2fs/super.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index 2852a0b34d64..7591d2d7b612 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -571,13 +571,9 @@ static struct inode *f2fs_alloc_inode(struct super_block *sb)
init_once((void *) fi);
- if (percpu_counter_init(&fi->dirty_pages, 0, GFP_NOFS)) {
- kmem_cache_free(f2fs_inode_cachep, fi);
- return NULL;
- }
-
/* Initialize f2fs-specific inode info */
fi->vfs_inode.i_version = 1;
+ atomic_set(&fi->dirty_pages, 0);
fi->i_current_depth = 1;
fi->i_advise = 0;
init_rwsem(&fi->i_sem);
@@ -703,7 +699,6 @@ static void f2fs_i_callback(struct rcu_head *head)
static void f2fs_destroy_inode(struct inode *inode)
{
- percpu_counter_destroy(&F2FS_I(inode)->dirty_pages);
call_rcu(&inode->i_rcu, f2fs_i_callback);
}
OpenPOWER on IntegriCloud