[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240514131711.379322-9-wedsonaf@gmail.com>
Date: Tue, 14 May 2024 10:16:49 -0300
From: Wedson Almeida Filho <wedsonaf@...il.com>
To: Alexander Viro <viro@...iv.linux.org.uk>,
Christian Brauner <brauner@...nel.org>,
Matthew Wilcox <willy@...radead.org>,
Dave Chinner <david@...morbit.com>
Cc: Kent Overstreet <kent.overstreet@...il.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-fsdevel@...r.kernel.org,
rust-for-linux@...r.kernel.org,
linux-kernel@...r.kernel.org,
Wedson Almeida Filho <walmeida@...rosoft.com>
Subject: [RFC PATCH v2 08/30] rust: file: move `kernel::file` to `kernel::fs::file`
From: Wedson Almeida Filho <walmeida@...rosoft.com>
This is in preparation for making `File` parametrised on the file system
type, so we can get a typed inode in file system implementations that
have data attached to inodes.
Signed-off-by: Wedson Almeida Filho <walmeida@...rosoft.com>
---
rust/kernel/fs.rs | 1 +
rust/kernel/{ => fs}/file.rs | 2 +-
rust/kernel/lib.rs | 1 -
3 files changed, 2 insertions(+), 2 deletions(-)
rename rust/kernel/{ => fs}/file.rs (99%)
diff --git a/rust/kernel/fs.rs b/rust/kernel/fs.rs
index f32c2f89f781..20fb6107eb4b 100644
--- a/rust/kernel/fs.rs
+++ b/rust/kernel/fs.rs
@@ -14,6 +14,7 @@
use sb::SuperBlock;
pub mod dentry;
+pub mod file;
pub mod inode;
pub mod sb;
diff --git a/rust/kernel/file.rs b/rust/kernel/fs/file.rs
similarity index 99%
rename from rust/kernel/file.rs
rename to rust/kernel/fs/file.rs
index b7ded0cdd063..908e2672676f 100644
--- a/rust/kernel/file.rs
+++ b/rust/kernel/fs/file.rs
@@ -76,7 +76,7 @@ pub mod flags {
/// # Examples
///
/// ```
- /// use kernel::file;
+ /// use kernel::fs::file;
/// # fn do_something() {}
/// # let flags = 0;
/// if (flags & file::flags::O_ACCMODE) == file::flags::O_RDONLY {
diff --git a/rust/kernel/lib.rs b/rust/kernel/lib.rs
index e664f80b8141..81065d1bd679 100644
--- a/rust/kernel/lib.rs
+++ b/rust/kernel/lib.rs
@@ -30,7 +30,6 @@
pub mod block;
mod build_assert;
pub mod error;
-pub mod file;
pub mod fs;
pub mod init;
pub mod ioctl;
--
2.34.1
Powered by blists - more mailing lists