Inline BorrowedHtBuf::tail

This commit is contained in:
bjorn3
2026-04-06 14:46:34 +02:00
committed by Jeremy Soller
parent bdf82a958a
commit e98e12780e
2 changed files with 1 additions and 4 deletions
-3
View File
@@ -503,9 +503,6 @@ impl BorrowedHtBuf {
SyscallFrame::Used { .. } | SyscallFrame::Dummy => Err(Error::new(EAGAIN)),
}
}
pub fn tail(token: &mut CleanLockToken) -> Result<Self> {
Self::tail_locked(token.downgrade())
}
pub fn tail_locked(token: LockToken<L3>) -> Result<Self> {
let current = context::current();
let frame = &mut current.write(token).syscall_tail;
+1 -1
View File
@@ -397,7 +397,7 @@ impl UserInner {
)
};
let mut tail = BorrowedHtBuf::tail(token)?;
let mut tail = BorrowedHtBuf::tail_locked(token.downgrade())?;
let tail_frame = tail.frame();
if buf.len() > tail.buf().len() {
return Err(Error::new(EINVAL));