diff mbox series

[01/25] lustre: remove additional cl_env_get()

Message ID 20250130141115.950749-2-jsimmons@infradead.org (mailing list archive)
State New
Headers show
Series lustre: sync to OpenSFS branch April 30, 2023 | expand

Commit Message

James Simmons Jan. 30, 2025, 2:10 p.m. UTC
The patch to adjust the read count for truncated file was not
properly applied. In ll_file_read_iter() cl_env moved to earlier
in the function but the original call to cl_env_get() remained.
This left an additional reference that later prevented the lustre
module from unloading.

Fixes: 07084899763 ("lustre: llite: adjust read count as file got truncated")
Signed-off-by: James Simmons <jsimmons@infradead.org>
---
 fs/lustre/llite/file.c | 4 ----
 1 file changed, 4 deletions(-)
diff mbox series

Patch

diff --git a/fs/lustre/llite/file.c b/fs/lustre/llite/file.c
index 05a75aed7826..24904acb28e0 100644
--- a/fs/lustre/llite/file.c
+++ b/fs/lustre/llite/file.c
@@ -2108,10 +2108,6 @@  static ssize_t ll_file_read_iter(struct kiocb *iocb, struct iov_iter *to)
 	if (result < 0 || iov_iter_count(to) == 0)
 		goto out;
 
-	env = cl_env_get(&refcheck);
-	if (IS_ERR(env))
-		return PTR_ERR(env);
-
 	args = ll_env_args(env);
 	args->u.normal.via_iter = to;
 	args->u.normal.via_iocb = iocb;