Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
LU-17504 build: fix gcc-13 [-Werror=stringop-overread] error
[fs/lustre-release.git]
/
lustre
/
utils
/
liblustreapi_fid.c
diff --git
a/lustre/utils/liblustreapi_fid.c
b/lustre/utils/liblustreapi_fid.c
index
b3bf411
..
bf326bc
100644
(file)
--- a/
lustre/utils/liblustreapi_fid.c
+++ b/
lustre/utils/liblustreapi_fid.c
@@
-472,15
+472,12
@@
int llapi_open_by_fid(const char *lustre_dir, const struct lu_fid *fid,
{
int mnt_fd, rc;
- /* this will return a cached FD if available, so only one open needed.
- * WANT_FD doesn't modify lustre_dir so casting away "const" is OK */
-
rc = llapi_root_path_open(lustre_dir, &mnt_fd);
if (rc)
goto out;
- /* "mnt_fd" is cached internally for reuse, no need to close it */
rc = llapi_open_by_fid_at(mnt_fd, fid, flags);
+ close(mnt_fd);
out:
return rc;
}