Thread (33 messages) 33 messages, 6 authors, 2011-10-11

[Ext4 Secure Delete 6/7v4] ext4: Secure Delete: Secure delete meta data blocks

From: Allison Henderson <hidden>
Date: 2011-10-07 07:07:14
Also in: linux-fsdevel
Subsystem: ext4 file system, filesystems (vfs and infrastructure), the rest · Maintainers: "Theodore Ts'o", Alexander Viro, Christian Brauner, Linus Torvalds

This patch modifies ext4_free_blocks to securely delete meta blocks
when needed

Signed-off-by: Allison Henderson <redacted>
---
:100644 100644 17a5a57... d25bb4d... M	fs/ext4/mballoc.c
 fs/ext4/mballoc.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index 17a5a57..d25bb4d 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -4607,6 +4607,14 @@ do_more:
 	if (err)
 		goto error_return;
 
+	if ((flags & EXT4_FREE_BLOCKS_METADATA) &&
+		EXT4_I(inode)->i_flags & EXT4_SECRM_FL) {
+
+		err = ext4_secure_delete_pblks(inode, block, count);
+		if (err)
+			goto error_return;
+	}
+
 	if ((flags & EXT4_FREE_BLOCKS_METADATA) && ext4_handle_valid(handle)) {
 		struct ext4_free_data *new_entry;
 		/*
-- 
1.7.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help