Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 8062
b: refs/heads/master
c: e85b565
h: refs/heads/master
v: v3
  • Loading branch information
Mark Fasheh authored and Linus Torvalds committed Sep 9, 2005
1 parent b92befc commit 1813ca0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7f6fd5db2dbc28d475d67f9a6b041fefe1d6f7c8
refs/heads/master: e85b565233236a2a833adea73fb2f0e0f8fa2a61
12 changes: 7 additions & 5 deletions trunk/fs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -1034,19 +1034,21 @@ void generic_delete_inode(struct inode *inode)
inodes_stat.nr_inodes--;
spin_unlock(&inode_lock);

if (inode->i_data.nrpages)
truncate_inode_pages(&inode->i_data, 0);

security_inode_delete(inode);

if (op->delete_inode) {
void (*delete)(struct inode *) = op->delete_inode;
if (!is_bad_inode(inode))
DQUOT_INIT(inode);
/* s_op->delete_inode internally recalls clear_inode() */
/* Filesystems implementing their own
* s_op->delete_inode are required to call
* truncate_inode_pages and clear_inode()
* internally */
delete(inode);
} else
} else {
truncate_inode_pages(&inode->i_data, 0);
clear_inode(inode);
}
spin_lock(&inode_lock);
hlist_del_init(&inode->i_hash);
spin_unlock(&inode_lock);
Expand Down

0 comments on commit 1813ca0

Please sign in to comment.