hulk inclusion category: bugfix bugzilla: 187526, https://gitee.com/openeuler/kernel/issues/I76JSK CVE: NA
--------------------------------
This reverts "xfs: propagate the return value of xfs_log_force() to avoid soft lockup", Avoid conflicts with mainline patches in subsequent rounds, where the mainline patch solves the problem that the current patch solves.
Signed-off-by: Long Li leo.lilong@huawei.com --- fs/xfs/libxfs/xfs_alloc.c | 22 ++++++---------------- fs/xfs/xfs_extent_busy.c | 6 ++---- fs/xfs/xfs_extent_busy.h | 2 +- 3 files changed, 9 insertions(+), 21 deletions(-)
diff --git a/fs/xfs/libxfs/xfs_alloc.c b/fs/xfs/libxfs/xfs_alloc.c index 2e7d442c117b..ce3dcd57e756 100644 --- a/fs/xfs/libxfs/xfs_alloc.c +++ b/fs/xfs/libxfs/xfs_alloc.c @@ -1629,11 +1629,8 @@ xfs_alloc_ag_vextent_near( if (!acur.len) { if (acur.busy) { trace_xfs_alloc_near_busy(args); - error = xfs_extent_busy_flush(args->mp, args->pag, + xfs_extent_busy_flush(args->mp, args->pag, acur.busy_gen); - if (error) - goto out; - goto restart; } trace_xfs_alloc_size_neither(args); @@ -1736,14 +1733,11 @@ xfs_alloc_ag_vextent_size( * Make it unbusy by forcing the log out and * retrying. */ - trace_xfs_alloc_size_busy(args); - error = xfs_extent_busy_flush(args->mp, - args->pag, busy_gen); - if (error) - goto error0; - xfs_btree_del_cursor(cnt_cur, XFS_BTREE_NOERROR); + trace_xfs_alloc_size_busy(args); + xfs_extent_busy_flush(args->mp, + args->pag, busy_gen); goto restart; } } @@ -1825,13 +1819,9 @@ xfs_alloc_ag_vextent_size( args->len = rlen; if (rlen < args->minlen) { if (busy) { - trace_xfs_alloc_size_busy(args); - error = xfs_extent_busy_flush(args->mp, args->pag, - busy_gen); - if (error) - goto error0; - xfs_btree_del_cursor(cnt_cur, XFS_BTREE_NOERROR); + trace_xfs_alloc_size_busy(args); + xfs_extent_busy_flush(args->mp, args->pag, busy_gen); goto restart; } goto out_nominleft; diff --git a/fs/xfs/xfs_extent_busy.c b/fs/xfs/xfs_extent_busy.c index ea3cee00149a..26680444969c 100644 --- a/fs/xfs/xfs_extent_busy.c +++ b/fs/xfs/xfs_extent_busy.c @@ -579,7 +579,7 @@ xfs_extent_busy_clear( /* * Flush out all busy extents for this AG. */ -int +void xfs_extent_busy_flush( struct xfs_mount *mp, struct xfs_perag *pag, @@ -590,7 +590,7 @@ xfs_extent_busy_flush(
error = xfs_log_force(mp, XFS_LOG_SYNC); if (error) - return error; + return;
do { prepare_to_wait(&pag->pagb_wait, &wait, TASK_KILLABLE); @@ -600,8 +600,6 @@ xfs_extent_busy_flush( } while (1);
finish_wait(&pag->pagb_wait, &wait); - - return 0; }
void diff --git a/fs/xfs/xfs_extent_busy.h b/fs/xfs/xfs_extent_busy.h index 7099f4bb358c..8aea07100092 100644 --- a/fs/xfs/xfs_extent_busy.h +++ b/fs/xfs/xfs_extent_busy.h @@ -50,7 +50,7 @@ bool xfs_extent_busy_trim(struct xfs_alloc_arg *args, xfs_agblock_t *bno, xfs_extlen_t *len, unsigned *busy_gen);
-int +void xfs_extent_busy_flush(struct xfs_mount *mp, struct xfs_perag *pag, unsigned busy_gen);