diff options
author | Dylan Reid <dgreid@chromium.org> | 2020-04-22 17:26:00 +0000 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-04-23 19:50:08 +0000 |
commit | 1160f456a4f21eb7ff11630fdeed224c3b4c56b4 (patch) | |
tree | 77aeabe5cfe166d2b75bcfed5db7d273626acf5c /src/linux.rs | |
parent | a7b6a1c897205d8320482eb506167c5df66647b2 (diff) | |
download | crosvm-1160f456a4f21eb7ff11630fdeed224c3b4c56b4.tar crosvm-1160f456a4f21eb7ff11630fdeed224c3b4c56b4.tar.gz crosvm-1160f456a4f21eb7ff11630fdeed224c3b4c56b4.tar.bz2 crosvm-1160f456a4f21eb7ff11630fdeed224c3b4c56b4.tar.lz crosvm-1160f456a4f21eb7ff11630fdeed224c3b4c56b4.tar.xz crosvm-1160f456a4f21eb7ff11630fdeed224c3b4c56b4.tar.zst crosvm-1160f456a4f21eb7ff11630fdeed224c3b4c56b4.zip |
sys_util: timerfd: Methods don't need to me mut
Because TimerFd is a wrapper around a 'File' that is never modified there isn't a need for a mutable borrow. The kernel already handles the interior mutability of the underlying file descriptor. Change-Id: I7ae068cc54050b0021d00620b561335b2ae0ba16 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2161625 Reviewed-by: Dylan Reid <dgreid@chromium.org> Reviewed-by: Zach Reizner <zachr@chromium.org> Tested-by: Dylan Reid <dgreid@chromium.org> Tested-by: kokoro <noreply+kokoro@google.com> Commit-Queue: Dylan Reid <dgreid@chromium.org>
Diffstat (limited to 'src/linux.rs')
-rw-r--r-- | src/linux.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/linux.rs b/src/linux.rs index 8690ff7..c8eb478 100644 --- a/src/linux.rs +++ b/src/linux.rs @@ -1767,7 +1767,7 @@ fn run_control( } // Balance available memory between guest and host every second. - let mut balancemem_timer = TimerFd::new().map_err(Error::CreateTimerFd)?; + let balancemem_timer = TimerFd::new().map_err(Error::CreateTimerFd)?; if Path::new(LOWMEM_AVAILABLE).exists() { // Create timer request balloon stats every 1s. poll_ctx |