Skip to content

Commit 446cafc

Browse files
author
Andreas Hindborg
committed
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/[email protected] Signed-off-by: Andreas Hindborg <[email protected]>
1 parent bbb67d4 commit 446cafc

File tree

4 files changed

+1057
-0
lines changed

4 files changed

+1057
-0
lines changed

rust/bindings/bindings_helper.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include <linux/blk-mq.h>
1111
#include <linux/blk_types.h>
1212
#include <linux/blkdev.h>
13+
#include <linux/configfs.h>
1314
#include <linux/cpumask.h>
1415
#include <linux/cred.h>
1516
#include <linux/device/faux.h>

rust/helpers/mutex.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,8 @@ void rust_helper_mutex_assert_is_held(struct mutex *mutex)
1717
{
1818
lockdep_assert_held(mutex);
1919
}
20+
21+
void rust_helper_mutex_destroy(struct mutex *lock)
22+
{
23+
mutex_destroy(lock);
24+
}

0 commit comments

Comments
 (0)