Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fef26658 authored by Mark Fasheh's avatar Mark Fasheh Committed by Linus Torvalds
Browse files

[PATCH] update filesystems for new delete_inode behavior



Update the file systems in fs/ implementing a delete_inode() callback to
call truncate_inode_pages().  One implementation note: In developing this
patch I put the calls to truncate_inode_pages() at the very top of those
filesystems delete_inode() callbacks in order to retain the previous
behavior.  I'm guessing that some of those could probably be optimized.

Signed-off-by: default avatarMark Fasheh <mark.fasheh@oracle.com>
Acked-by: default avatarChristoph Hellwig <hch@infradead.org>
Signed-off-by: default avatarHugh Dickins <hugh@veritas.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent e85b5652
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -255,6 +255,7 @@ void
affs_delete_inode(struct inode *inode)
{
	pr_debug("AFFS: delete_inode(ino=%lu, nlink=%u)\n", inode->i_ino, inode->i_nlink);
	truncate_inode_pages(&inode->i_data, 0);
	inode->i_size = 0;
	if (S_ISREG(inode->i_mode))
		affs_truncate(inode);
+2 −0
Original line number Diff line number Diff line
@@ -143,6 +143,8 @@ static void bfs_delete_inode(struct inode * inode)

	dprintf("ino=%08lx\n", inode->i_ino);

	truncate_inode_pages(&inode->i_data, 0);

	if (inode->i_ino < BFS_ROOT_INO || inode->i_ino > info->si_lasti) {
		printf("invalid ino=%08lx\n", inode->i_ino);
		return;
+2 −0
Original line number Diff line number Diff line
@@ -71,6 +71,8 @@ void ext2_put_inode(struct inode *inode)
 */
void ext2_delete_inode (struct inode * inode)
{
	truncate_inode_pages(&inode->i_data, 0);

	if (is_bad_inode(inode))
		goto no_delete;
	EXT2_I(inode)->i_dtime	= get_seconds();
+2 −0
Original line number Diff line number Diff line
@@ -187,6 +187,8 @@ void ext3_delete_inode (struct inode * inode)
{
	handle_t *handle;

	truncate_inode_pages(&inode->i_data, 0);

	if (is_bad_inode(inode))
		goto no_delete;

+2 −0
Original line number Diff line number Diff line
@@ -335,6 +335,8 @@ EXPORT_SYMBOL(fat_build_inode);

static void fat_delete_inode(struct inode *inode)
{
	truncate_inode_pages(&inode->i_data, 0);

	if (!is_bad_inode(inode)) {
		inode->i_size = 0;
		fat_truncate(inode);
Loading