From 5ce259509604976da84a18fa1bb95544c7d273b8 Mon Sep 17 00:00:00 2001 From: adamrk Date: Sat, 17 Oct 2020 19:53:35 +0000 Subject: [PATCH] Convert return type with into --- rust/kernel/src/file_operations.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust/kernel/src/file_operations.rs b/rust/kernel/src/file_operations.rs index 00bfb2866315b9..37c45aa2b2edae 100644 --- a/rust/kernel/src/file_operations.rs +++ b/rust/kernel/src/file_operations.rs @@ -158,7 +158,7 @@ unsafe extern "C" fn fsync_callback( let fsync = T::FSYNC.unwrap(); let f = &*((*file).private_data as *const T); match fsync(f, &File::from_ptr(file), start, end, datasync) { - Ok(result) => result as c_types::c_int, + Ok(result) => result.into(), Err(e) => e.to_kernel_errno(), } }