[lustre-devel] [PATCH 17/21] lustre: clio: Trivial DIO cleanups

James Simmons jsimmons at infradead.org
Fri Feb 7 16:30:23 PST 2025


From: Patrick Farrell <pfarrell at whamcloud.com>

This is some minor DIO refactoring and an additional debug
message discovered while working on this.  Extremely minor.

WC-bug-id: https://jira.whamcloud.com/browse/LU-13805
Lustre-commit: a667cfac0e70cd4da ("LU-13805 clio: Trivial DIO cleanups")
Signed-off-by: Patrick Farrell <pfarrell at whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49987
Reviewed-by: Oleg Drokin <green at whamcloud.com>
Reviewed-by: Andreas Dilger <adilger at whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson at ddn.com>
Signed-off-by: James Simmons <jsimmons at infradead.org>
---
 fs/lustre/obdclass/cl_io.c | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/fs/lustre/obdclass/cl_io.c b/fs/lustre/obdclass/cl_io.c
index ee82260ab0f5..d6518e9f9c66 100644
--- a/fs/lustre/obdclass/cl_io.c
+++ b/fs/lustre/obdclass/cl_io.c
@@ -1273,14 +1273,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);
 		}
 	}
 }
-- 
2.39.3



More information about the lustre-devel mailing list