Skip to content

Commit 77e3e31

Browse files
author
Andreas Hindborg
committed
LIST: [PATCH v2 2/3] rust: configfs: introduce rust support for configfs
This patch adds a rust API for configfs, thus allowing rust modules to use configfs for configuration. The implementation is a shim on top of the C configfs implementation allowing safe use of the C infrastructure from rust. The patch enables the `const_mut_refs` feature on compilers before rustc 1.83. The feature was stabilized in rustc 1.83 and is not required to be explicitly enabled on later versions. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Andreas Hindborg <[email protected]>
1 parent fe660bc commit 77e3e31

File tree

7 files changed

+1066
-0
lines changed

7 files changed

+1066
-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/cred.h>
1415
#include <linux/errname.h>
1516
#include <linux/ethtool.h>

rust/helpers/mutex.c

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

0 commit comments

Comments
 (0)