diff --git a/devices/src/virtio/fs/passthrough.rs b/devices/src/virtio/fs/passthrough.rs
index 4ca7ee6b2d..6b843fc01f 100644
--- a/devices/src/virtio/fs/passthrough.rs
+++ b/devices/src/virtio/fs/passthrough.rs
@@ -66,14 +66,16 @@ unsafe impl DataInit for LinuxDirent64 {}
macro_rules! scoped_cred {
($name:ident, $ty:ty, $syscall_nr:expr) => {
#[derive(Debug)]
- struct $name;
+ struct $name {
+ old: $ty,
+ }
impl $name {
- // Changes the effective uid/gid of the current thread to `val`. Changes
- // the thread's credentials back to root when the returned struct is dropped.
- fn new(val: $ty) -> io::Result