Commit 446cafc2 authored by Andreas Hindborg's avatar Andreas Hindborg
Browse files

rust: configfs: introduce rust support for configfs

Add a Rust API for configfs, thus allowing Rust modules to use configfs for
configuration. Make the implementation a shim on top of the C configfs
implementation, allowing safe use of the C infrastructure from Rust.

Link: https://lore.kernel.org/r/20250508-configfs-v8-1-8ebde6180edc@kernel.org


Signed-off-by: default avatarAndreas Hindborg <a.hindborg@kernel.org>
parent bbb67d4f
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -10,6 +10,7 @@
#include <linux/blk-mq.h>
#include <linux/blk_types.h>
#include <linux/blkdev.h>
#include <linux/configfs.h>
#include <linux/cpumask.h>
#include <linux/cred.h>
#include <linux/device/faux.h>
+5 −0
Original line number Diff line number Diff line
@@ -17,3 +17,8 @@ void rust_helper_mutex_assert_is_held(struct mutex *mutex)
{
	lockdep_assert_held(mutex);
}

void rust_helper_mutex_destroy(struct mutex *lock)
{
	mutex_destroy(lock);
}
+1049 −0

File added.

Preview size limit exceeded, changes collapsed.

+2 −0
Original line number Diff line number Diff line
@@ -42,6 +42,8 @@
pub mod block;
#[doc(hidden)]
pub mod build_assert;
#[cfg(CONFIG_CONFIGFS_FS)]
pub mod configfs;
pub mod cred;
pub mod device;
pub mod device_id;