summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorGuozhonghua <guozhonghua@h3c.com>2019-09-24 00:33:18 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2019-09-25 00:54:07 +0200
commit3dd21cdbefa97cf3ec5559f9ab214af4d8ae2096 (patch)
treeb67e9c12849451b181751caa197fb2401c381127 /fs
parentocfs2: further debugfs cleanups (diff)
downloadlinux-3dd21cdbefa97cf3ec5559f9ab214af4d8ae2096.tar.xz
linux-3dd21cdbefa97cf3ec5559f9ab214af4d8ae2096.zip
ocfs2: remove unused ocfs2_calc_tree_trunc_credits()
ocfs2_calc_tree_trunc_credits() is not called anywhere. Link: http://lkml.kernel.org/r/71604351584F6A4EBAE558C676F37CA4014FC2050F@H3CMLB12-EX.srv.huawei-3com.com Signed-off-by: guozhonghua <guozhonghua@h3c.com> Reviewed-by: Andrew Morton <akpm@linux-foundation.org> Cc: Mark Fasheh <mark@fasheh.com> Cc: Joel Becker <jlbec@evilplan.org> Cc: Junxiao Bi <junxiao.bi@oracle.com> Cc: Joseph Qi <jiangqi903@gmail.com> Cc: Changwei Ge <gechangwei@live.cn> Cc: Gang He <ghe@suse.com> Cc: Jun Piao <piaojun@huawei.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/ocfs2/journal.h28
1 files changed, 0 insertions, 28 deletions
diff --git a/fs/ocfs2/journal.h b/fs/ocfs2/journal.h
index f37473c20a7b..6d8dd3308aaf 100644
--- a/fs/ocfs2/journal.h
+++ b/fs/ocfs2/journal.h
@@ -575,34 +575,6 @@ static inline int ocfs2_calc_bg_discontig_credits(struct super_block *sb)
return ocfs2_extent_recs_per_gd(sb);
}
-static inline int ocfs2_calc_tree_trunc_credits(struct super_block *sb,
- unsigned int clusters_to_del,
- struct ocfs2_dinode *fe,
- struct ocfs2_extent_list *last_el)
-{
- /* for dinode + all headers in this pass + update to next leaf */
- u16 next_free = le16_to_cpu(last_el->l_next_free_rec);
- u16 tree_depth = le16_to_cpu(fe->id2.i_list.l_tree_depth);
- int credits = 1 + tree_depth + 1;
- int i;
-
- i = next_free - 1;
- BUG_ON(i < 0);
-
- /* We may be deleting metadata blocks, so metadata alloc dinode +
- one desc. block for each possible delete. */
- if (tree_depth && next_free == 1 &&
- ocfs2_rec_clusters(last_el, &last_el->l_recs[i]) == clusters_to_del)
- credits += 1 + tree_depth;
-
- /* update to the truncate log. */
- credits += OCFS2_TRUNCATE_LOG_UPDATE;
-
- credits += ocfs2_quota_trans_credits(sb);
-
- return credits;
-}
-
static inline int ocfs2_jbd2_inode_add_write(handle_t *handle, struct inode *inode,
loff_t start_byte, loff_t length)
{