Skip to content

Commit

Permalink
xfs: remove xfs_blkdev_issue_flush
Browse files Browse the repository at this point in the history
It's a one line wrapper around blkdev_issue_flush(). Just replace it
with direct calls to blkdev_issue_flush().

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Chandan Babu R <chandanrlinux@gmail.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Allison Henderson <allison.henderson@oracle.com>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
  • Loading branch information
Dave Chinner authored and Darrick J. Wong committed Jun 21, 2021
1 parent a79b28c commit b5071ad
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 13 deletions.
2 changes: 1 addition & 1 deletion fs/xfs/xfs_buf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1889,7 +1889,7 @@ xfs_free_buftarg(
percpu_counter_destroy(&btp->bt_io_count);
list_lru_destroy(&btp->bt_lru);

xfs_blkdev_issue_flush(btp);
blkdev_issue_flush(btp->bt_bdev);

kmem_free(btp);
}
Expand Down
6 changes: 3 additions & 3 deletions fs/xfs/xfs_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,9 @@ xfs_file_fsync(
* inode size in case of an extending write.
*/
if (XFS_IS_REALTIME_INODE(ip))
xfs_blkdev_issue_flush(mp->m_rtdev_targp);
blkdev_issue_flush(mp->m_rtdev_targp->bt_bdev);
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);

/*
* Any inode that has dirty modifications in the log is pinned. The
Expand All @@ -219,7 +219,7 @@ xfs_file_fsync(
*/
if (!log_flushed && !XFS_IS_REALTIME_INODE(ip) &&
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);

return error;
}
Expand Down
2 changes: 1 addition & 1 deletion fs/xfs/xfs_log.c
Original file line number Diff line number Diff line change
Expand Up @@ -1964,7 +1964,7 @@ xlog_sync(
* layer state machine for preflushes.
*/
if (log->l_targ != log->l_mp->m_ddev_targp || split) {
xfs_blkdev_issue_flush(log->l_mp->m_ddev_targp);
blkdev_issue_flush(log->l_mp->m_ddev_targp->bt_bdev);
need_flush = false;
}

Expand Down
7 changes: 0 additions & 7 deletions fs/xfs/xfs_super.c
Original file line number Diff line number Diff line change
Expand Up @@ -340,13 +340,6 @@ xfs_blkdev_put(
blkdev_put(bdev, FMODE_READ|FMODE_WRITE|FMODE_EXCL);
}

void
xfs_blkdev_issue_flush(
xfs_buftarg_t *buftarg)
{
blkdev_issue_flush(buftarg->bt_bdev);
}

STATIC void
xfs_close_devices(
struct xfs_mount *mp)
Expand Down
1 change: 0 additions & 1 deletion fs/xfs/xfs_super.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ struct xfs_buftarg;
struct block_device;

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 *,
xfs_agnumber_t agcount);

Expand Down

0 comments on commit b5071ad

Please sign in to comment.