diff mbox series

[17/21] lustre: clio: Trivial DIO cleanups

Message ID 20250208003027.180076-18-jsimmons@infradead.org (mailing list archive)
State New
Headers show
Series lustre: sync to OpenSFS branch June 28, 2023 | expand

Commit Message

James Simmons Feb. 8, 2025, 12:30 a.m. UTC
From: Patrick Farrell <pfarrell@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@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49987
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
---
 fs/lustre/obdclass/cl_io.c | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)
diff mbox series

Patch

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);
 		}
 	}
 }