Whamcloud - gitweb
LU-10765 hsm: fix source_fd type in hsm_copyaction_private
The source_fd field in struct hsm_copyaction_private was defined as
__u32 (unsigned), but was being used with -1 to indicate an invalid
file descriptor. This mismatch caused the error handling code to
incorrectly check if source_fd < 0, which is impossible for an
unsigned value, potentially leading to file descriptor leaks.
Change the type of source_fd from __u32 to __s32 to match how it's
used and to be consistent with data_fd which is already __s32.
Test-Parameters: trivial
Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: I41d74642d9906075ec7eda670e4c390d55fed297
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58980
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>