aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChao Yu <chao2.yu@samsung.com>2015-12-01 11:47:33 +0800
committerMister Oyster <oysterized@gmail.com>2017-04-13 12:32:29 +0200
commit069e02e36fa974ae49e7390629beed69cabc4d77 (patch)
tree2db4c907505441e55e11bf5f365174ca0a58e72e
parentd3c58fbf8a93691197f0cc56fe9c64218ec3d607 (diff)
f2fs: kill f2fs_drop_largest_extent
For direct IO, f2fs only allocate new address for the block which is not exist in the disk before, its mapping info should not exist in extent cache previously, so here we do not need to call f2fs_drop_largest_extent to drop related cache. Due to no more callers for f2fs_drop_largest_extent now, kill it. Signed-off-by: Chao Yu <chao2.yu@samsung.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
-rw-r--r--fs/f2fs/data.c4
-rw-r--r--fs/f2fs/extent_cache.c8
-rw-r--r--fs/f2fs/f2fs.h1
3 files changed, 0 insertions, 13 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index 97299cb0d..a2ee3b3c5 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -495,10 +495,6 @@ alloc:
if (i_size_read(dn->inode) < ((loff_t)(fofs + 1) << PAGE_CACHE_SHIFT))
i_size_write(dn->inode,
((loff_t)(fofs + 1) << PAGE_CACHE_SHIFT));
-
- /* direct IO doesn't use extent cache to maximize the performance */
- f2fs_drop_largest_extent(dn->inode, fofs);
-
return 0;
}
diff --git a/fs/f2fs/extent_cache.c b/fs/f2fs/extent_cache.c
index de063f2b2..e86e9f1e0 100644
--- a/fs/f2fs/extent_cache.c
+++ b/fs/f2fs/extent_cache.c
@@ -164,14 +164,6 @@ static void __drop_largest_extent(struct inode *inode,
largest->len = 0;
}
-void f2fs_drop_largest_extent(struct inode *inode, pgoff_t fofs)
-{
- if (!f2fs_may_extent_tree(inode))
- return;
-
- __drop_largest_extent(inode, fofs, 1);
-}
-
void f2fs_init_extent_tree(struct inode *inode, struct f2fs_extent *i_ext)
{
struct f2fs_sb_info *sbi = F2FS_I_SB(inode);
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index a469c85a8..3d0eaf045 100644
--- a/fs/f2fs/f2fs.h
+++ b/fs/f2fs/f2fs.h
@@ -2083,7 +2083,6 @@ void f2fs_leave_shrinker(struct f2fs_sb_info *);
* extent_cache.c
*/
unsigned int f2fs_shrink_extent_tree(struct f2fs_sb_info *, int);
-void f2fs_drop_largest_extent(struct inode *, pgoff_t);
void f2fs_init_extent_tree(struct inode *, struct f2fs_extent *);
unsigned int f2fs_destroy_extent_node(struct inode *);
void f2fs_destroy_extent_tree(struct inode *);