[lustre-devel] [PATCH 01/25] lustre: remove additional cl_env_get()
James Simmons
jsimmons at infradead.org
Thu Jan 30 06:10:51 PST 2025
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 at infradead.org>
---
fs/lustre/llite/file.c | 4 ----
1 file changed, 4 deletions(-)
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;
--
2.39.3
More information about the lustre-devel
mailing list