Inline BorrowedHtBuf::tail
This commit is contained in:
@@ -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
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user