[PATCH] orangefs: Preserve client debug request errors

From: Zhu Jun

Date: Thu Nov 12 2026 - 02:33:44 EST


orangefs_debug_write() logs a failed service_operation() for a client
debug-mask request, then overwrites the error with the write count.
The caller is told that the request succeeded even though the client
operation failed.

After releasing the operation, return through the buffer cleanup path
on failure instead of updating the debugfs file contents and position.

Fixes: 274dcf55bd4a ("Orangefs: kernel client part 3")
Signed-off-by: Zhu Jun <zhujun2@xxxxxxxxxxxxxxxxxxxx>
---
fs/orangefs/orangefs-debugfs.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/fs/orangefs/orangefs-debugfs.c b/fs/orangefs/orangefs-debugfs.c
index fec7c1e864d2..5504066c3080 100644
--- a/fs/orangefs/orangefs-debugfs.c
+++ b/fs/orangefs/orangefs-debugfs.c
@@ -510,6 +510,8 @@ static ssize_t orangefs_debug_write(struct file *file,
rc);

op_release(new_op);
+ if (rc)
+ goto out;
}

mutex_lock(&orangefs_debug_lock);
--
2.51.0