[lustre-devel] [PATCH 01/25] lustre: remove additional cl_env_get()
James Simmons <[email protected]> Thu, 30 Jan 2025 09:10:51 -0500
| Newsgroups | org.lustre.lists.lustre-devel |
|---|---|
| Message-ID | <[email protected]> |
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 <[email protected]>
---
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
_______________________________________________
lustre-devel mailing list
[email protected]
http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org