From a667cfac0e70cd4da7c70ef28ffdcc25136996b2 Mon Sep 17 00:00:00 2001 From: Patrick Farrell Date: Sat, 11 Feb 2023 13:12:14 -0500 Subject: [PATCH] LU-13805 clio: Trivial DIO cleanups This is some minor DIO refactoring and an additional debug message discovered while working on this. Extremely minor. test-parameters: trivial Signed-off-by: Patrick Farrell Change-Id: Ica2a7340ac02d3ba0d8f65662ff4b39026078e81 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49987 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Oleg Drokin Reviewed-by: Andreas Dilger Reviewed-by: Sebastien Buisson --- lustre/obdclass/cl_io.c | 13 +++++-------- lustre/osc/osc_cache.c | 1 + 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/lustre/obdclass/cl_io.c b/lustre/obdclass/cl_io.c index e7a6fbd..88a578f 100644 --- a/lustre/obdclass/cl_io.c +++ b/lustre/obdclass/cl_io.c @@ -1386,14 +1386,11 @@ void cl_sync_io_note(const struct lu_env *env, struct cl_sync_io *anchor, spin_unlock(&anchor->csi_waitq.lock); - if (csi_dio_aio) { - if (end_io == cl_dio_aio_end) { - if (!creator_free) - cl_dio_aio_free(env, dio_aio); - } else if (end_io == cl_sub_dio_end) { - if (!creator_free) - cl_sub_dio_free(sub_dio_aio); - } + if (csi_dio_aio && !creator_free) { + if (end_io == cl_dio_aio_end) + cl_dio_aio_free(env, dio_aio); + else if (end_io == cl_sub_dio_end) + cl_sub_dio_free(sub_dio_aio); } } EXIT; diff --git a/lustre/osc/osc_cache.c b/lustre/osc/osc_cache.c index 9710fdc..65ad501 100644 --- a/lustre/osc/osc_cache.c +++ b/lustre/osc/osc_cache.c @@ -2206,6 +2206,7 @@ __must_hold(&cli->cl_loi_list_lock) spin_lock(&cli->cl_loi_list_lock); } + EXIT; } int osc_io_unplug0(const struct lu_env *env, struct client_obd *cli, -- 1.8.3.1