Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'vfs-6.18-rc1.rust' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs

Pull vfs rust updates from Christian Brauner:
"This contains a few minor vfs rust changes:

- Add the pid namespace Rust wrappers to the correct MAINTAINERS
entry

- Use to_result() in the Rust file error handling code

- Update imports for fs and pid_namespce Rust wrappers"

* tag 'vfs-6.18-rc1.rust' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs:
rust: file: use to_result for error handling
pid: add Rust files to MAINTAINERS
rust: fs: update ARef and AlwaysRefCounted imports from sync::aref
rust: pid_namespace: update AlwaysRefCounted imports from sync::aref

+7 -9
+1
MAINTAINERS
··· 19863 19863 L: linux-kernel@vger.kernel.org 19864 19864 S: Maintained 19865 19865 T: git git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux.git 19866 + F: rust/kernel/pid_namespace.rs 19866 19867 F: samples/pidfd/ 19867 19868 F: tools/testing/selftests/clone3/ 19868 19869 F: tools/testing/selftests/pid_namespace/
+5 -5
rust/kernel/fs/file.rs
··· 10 10 use crate::{ 11 11 bindings, 12 12 cred::Credential, 13 - error::{code::*, Error, Result}, 14 - types::{ARef, AlwaysRefCounted, NotThreadSafe, Opaque}, 13 + error::{code::*, to_result, Error, Result}, 14 + sync::aref::{ARef, AlwaysRefCounted}, 15 + types::{NotThreadSafe, Opaque}, 15 16 }; 16 17 use core::ptr; 17 18 ··· 399 398 pub fn get_unused_fd_flags(flags: u32) -> Result<Self> { 400 399 // SAFETY: FFI call, there are no safety requirements on `flags`. 401 400 let fd: i32 = unsafe { bindings::get_unused_fd_flags(flags) }; 402 - if fd < 0 { 403 - return Err(Error::from_errno(fd)); 404 - } 401 + to_result(fd)?; 402 + 405 403 Ok(Self { 406 404 fd: fd as u32, 407 405 _not_send: NotThreadSafe,
+1 -4
rust/kernel/pid_namespace.rs
··· 7 7 //! C header: [`include/linux/pid_namespace.h`](srctree/include/linux/pid_namespace.h) and 8 8 //! [`include/linux/pid.h`](srctree/include/linux/pid.h) 9 9 10 - use crate::{ 11 - bindings, 12 - types::{AlwaysRefCounted, Opaque}, 13 - }; 10 + use crate::{bindings, sync::aref::AlwaysRefCounted, types::Opaque}; 14 11 use core::ptr; 15 12 16 13 /// Wraps the kernel's `struct pid_namespace`. Thread safe.