提交 bea80ee4 编写于 作者: D Darrick J. Wong 提交者: Zheng Zengkai

xfs: remove trivial eof/cowblocks functions

mainline-inclusion
from mainline-v5.11-rc4
commit 865ac8e2
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I4KIAO
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=865ac8e253c97423c41e22ce615615eb006fc52e

-------------------------------------------------

Get rid of these trivial helpers.
Signed-off-by: NDarrick J. Wong <djwong@kernel.org>
Reviewed-by: NChristoph Hellwig <hch@lst.de>
Signed-off-by: NLihong Kou <koulihong@huawei.com>
Reviewed-by: NZhang Yi <yi.zhang@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 f450f5d2
...@@ -1324,15 +1324,6 @@ xfs_inode_free_eofblocks( ...@@ -1324,15 +1324,6 @@ xfs_inode_free_eofblocks(
return ret; return ret;
} }
static int
xfs_icache_free_eofblocks(
struct xfs_mount *mp,
struct xfs_eofblocks *eofb)
{
return xfs_inode_walk(mp, 0, xfs_inode_free_eofblocks, eofb,
XFS_ICI_EOFBLOCKS_TAG);
}
/* /*
* Background scanning to trim post-EOF preallocated space. This is queued * Background scanning to trim post-EOF preallocated space. This is queued
* based on the 'speculative_prealloc_lifetime' tunable (5m by default). * based on the 'speculative_prealloc_lifetime' tunable (5m by default).
...@@ -1358,7 +1349,8 @@ xfs_eofblocks_worker( ...@@ -1358,7 +1349,8 @@ xfs_eofblocks_worker(
if (!sb_start_write_trylock(mp->m_super)) if (!sb_start_write_trylock(mp->m_super))
return; return;
xfs_icache_free_eofblocks(mp, NULL); xfs_inode_walk(mp, 0, xfs_inode_free_eofblocks, NULL,
XFS_ICI_EOFBLOCKS_TAG);
sb_end_write(mp->m_super); sb_end_write(mp->m_super);
xfs_queue_eofblocks(mp); xfs_queue_eofblocks(mp);
...@@ -1567,15 +1559,6 @@ xfs_inode_free_cowblocks( ...@@ -1567,15 +1559,6 @@ xfs_inode_free_cowblocks(
return ret; return ret;
} }
static int
xfs_icache_free_cowblocks(
struct xfs_mount *mp,
struct xfs_eofblocks *eofb)
{
return xfs_inode_walk(mp, 0, xfs_inode_free_cowblocks, eofb,
XFS_ICI_COWBLOCKS_TAG);
}
/* /*
* Background scanning to trim preallocated CoW space. This is queued * Background scanning to trim preallocated CoW space. This is queued
* based on the 'speculative_cow_prealloc_lifetime' tunable (5m by default). * based on the 'speculative_cow_prealloc_lifetime' tunable (5m by default).
...@@ -1602,7 +1585,8 @@ xfs_cowblocks_worker( ...@@ -1602,7 +1585,8 @@ xfs_cowblocks_worker(
if (!sb_start_write_trylock(mp->m_super)) if (!sb_start_write_trylock(mp->m_super))
return; return;
xfs_icache_free_cowblocks(mp, NULL); xfs_inode_walk(mp, 0, xfs_inode_free_cowblocks, NULL,
XFS_ICI_COWBLOCKS_TAG);
sb_end_write(mp->m_super); sb_end_write(mp->m_super);
xfs_queue_cowblocks(mp); xfs_queue_cowblocks(mp);
...@@ -1653,11 +1637,13 @@ xfs_blockgc_scan( ...@@ -1653,11 +1637,13 @@ xfs_blockgc_scan(
{ {
int error; int error;
error = xfs_icache_free_eofblocks(mp, eofb); error = xfs_inode_walk(mp, 0, xfs_inode_free_eofblocks, eofb,
XFS_ICI_EOFBLOCKS_TAG);
if (error) if (error)
return error; return error;
error = xfs_icache_free_cowblocks(mp, eofb); error = xfs_inode_walk(mp, 0, xfs_inode_free_cowblocks, eofb,
XFS_ICI_COWBLOCKS_TAG);
if (error) if (error)
return error; return error;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册