From 1ef3c1e477570a4f60dd1530ce0c3435eb7dfee7 Mon Sep 17 00:00:00 2001 From: oupson Date: Thu, 6 Oct 2022 11:57:19 +0200 Subject: [PATCH] Remove opendir --- rustcryptfs-linux/src/encrypted_filesystem.rs | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/rustcryptfs-linux/src/encrypted_filesystem.rs b/rustcryptfs-linux/src/encrypted_filesystem.rs index a6973ac..cea097d 100644 --- a/rustcryptfs-linux/src/encrypted_filesystem.rs +++ b/rustcryptfs-linux/src/encrypted_filesystem.rs @@ -19,7 +19,6 @@ type InodeCache = BTreeMap; pub struct EncryptedFs { fs: GocryptFs, inode_cache: InodeCache, - file_handle: AtomicU64, } impl EncryptedFs { @@ -37,11 +36,7 @@ impl EncryptedFs { let mut inode_cache = BTreeMap::new(); inode_cache.insert(FUSE_ROOT_ID, path.to_path_buf()); - Ok(Self { - fs, - inode_cache, - file_handle: AtomicU64::new(0), - }) + Ok(Self { fs, inode_cache }) } pub fn mount

(self, mountpoint: P) @@ -198,17 +193,6 @@ impl Filesystem for EncryptedFs { } } - fn opendir( - &mut self, - _req: &fuser::Request<'_>, - ino: u64, - _flags: i32, - reply: fuser::ReplyOpen, - ) { - let fh = self.file_handle.fetch_add(1, Ordering::SeqCst); - reply.opened(fh, 0); - } - fn readdir( &mut self, _req: &fuser::Request<'_>,