提交 ce2f113e 编写于 作者: D Dave Chinner 提交者: Long Li

xfs: remove xfs_blkdev_issue_flush

mainline inclusion
from mainline-v5.13-rc4
commit b5071ada
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I76JSK
CVE: NA

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

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

It's a one line wrapper around blkdev_issue_flush(). Just replace it
with direct calls to blkdev_issue_flush().
Signed-off-by: NDave Chinner <dchinner@redhat.com>
Reviewed-by: NChandan Babu R <chandanrlinux@gmail.com>
Reviewed-by: NDarrick J. Wong <djwong@kernel.org>
Reviewed-by: NChristoph Hellwig <hch@lst.de>
Reviewed-by: NBrian Foster <bfoster@redhat.com>
Reviewed-by: NAllison Henderson <allison.henderson@oracle.com>
Signed-off-by: NDarrick J. Wong <djwong@kernel.org>

conflicts:
fs/xfs/xfs_log.c
fs/xfs/xfs_super.c
fs/xfs/xfs_super.h
Signed-off-by: NYe Bin <yebin10@huawei.com>
Signed-off-by: NLong Li <leo.lilong@huawei.com>
上级 bee0603b
...@@ -1970,7 +1970,7 @@ xfs_free_buftarg( ...@@ -1970,7 +1970,7 @@ xfs_free_buftarg(
percpu_counter_destroy(&btp->bt_io_count); percpu_counter_destroy(&btp->bt_io_count);
list_lru_destroy(&btp->bt_lru); list_lru_destroy(&btp->bt_lru);
xfs_blkdev_issue_flush(btp); blkdev_issue_flush(btp->bt_bdev, GFP_NOFS);
invalidate_bdev(btp->bt_bdev); invalidate_bdev(btp->bt_bdev);
kmem_free(btp); kmem_free(btp);
......
...@@ -197,9 +197,9 @@ xfs_file_fsync( ...@@ -197,9 +197,9 @@ xfs_file_fsync(
* inode size in case of an extending write. * inode size in case of an extending write.
*/ */
if (XFS_IS_REALTIME_INODE(ip)) if (XFS_IS_REALTIME_INODE(ip))
xfs_blkdev_issue_flush(mp->m_rtdev_targp); blkdev_issue_flush(mp->m_rtdev_targp->bt_bdev, GFP_NOFS);
else if (mp->m_logdev_targp != mp->m_ddev_targp) else if (mp->m_logdev_targp != mp->m_ddev_targp)
xfs_blkdev_issue_flush(mp->m_ddev_targp); blkdev_issue_flush(mp->m_ddev_targp->bt_bdev, GFP_NOFS);
/* /*
* Any inode that has dirty modifications in the log is pinned. The * Any inode that has dirty modifications in the log is pinned. The
...@@ -219,7 +219,7 @@ xfs_file_fsync( ...@@ -219,7 +219,7 @@ xfs_file_fsync(
*/ */
if (!log_flushed && !XFS_IS_REALTIME_INODE(ip) && if (!log_flushed && !XFS_IS_REALTIME_INODE(ip) &&
mp->m_logdev_targp == mp->m_ddev_targp) mp->m_logdev_targp == mp->m_ddev_targp)
xfs_blkdev_issue_flush(mp->m_ddev_targp); blkdev_issue_flush(mp->m_ddev_targp->bt_bdev, GFP_NOFS);
return error; return error;
} }
......
...@@ -1809,7 +1809,8 @@ xlog_write_iclog( ...@@ -1809,7 +1809,8 @@ xlog_write_iclog(
* but it *must* complete before we issue the external log IO. * but it *must* complete before we issue the external log IO.
*/ */
if (log->l_targ != log->l_mp->m_ddev_targp) if (log->l_targ != log->l_mp->m_ddev_targp)
xfs_blkdev_issue_flush(log->l_mp->m_ddev_targp); blkdev_issue_flush(log->l_mp->m_ddev_targp->bt_bdev,
GFP_NOFS);
} }
if (iclog->ic_flags & XLOG_ICL_NEED_FUA) if (iclog->ic_flags & XLOG_ICL_NEED_FUA)
iclog->ic_bio.bi_opf |= REQ_FUA; iclog->ic_bio.bi_opf |= REQ_FUA;
......
...@@ -355,13 +355,6 @@ xfs_blkdev_put( ...@@ -355,13 +355,6 @@ xfs_blkdev_put(
blkdev_put(bdev, FMODE_READ|FMODE_WRITE|FMODE_EXCL); blkdev_put(bdev, FMODE_READ|FMODE_WRITE|FMODE_EXCL);
} }
void
xfs_blkdev_issue_flush(
xfs_buftarg_t *buftarg)
{
blkdev_issue_flush(buftarg->bt_bdev, GFP_NOFS);
}
STATIC void STATIC void
xfs_close_devices( xfs_close_devices(
struct xfs_mount *mp) struct xfs_mount *mp)
......
...@@ -88,7 +88,6 @@ struct block_device; ...@@ -88,7 +88,6 @@ struct block_device;
extern void xfs_quiesce_attr(struct xfs_mount *mp); extern void xfs_quiesce_attr(struct xfs_mount *mp);
extern void xfs_flush_inodes(struct xfs_mount *mp); extern void xfs_flush_inodes(struct xfs_mount *mp);
extern void xfs_blkdev_issue_flush(struct xfs_buftarg *);
extern xfs_agnumber_t xfs_set_inode_alloc(struct xfs_mount *, extern xfs_agnumber_t xfs_set_inode_alloc(struct xfs_mount *,
xfs_agnumber_t agcount); xfs_agnumber_t agcount);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册