Commit be7ce4161f9e6bf2497f90337d1214aa6ee06e15

Authored by Al Viro
1 parent b4272d4c81

New method - evict_inode()

Hybrid of ->clear_inode() and ->delete_inode(); if present, does
all fs work to be done when in-core inode is about to be gone,
for whatever reason.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Showing 2 changed files with 4 additions and 1 deletions Side-by-side Diff

... ... @@ -325,7 +325,9 @@
325 325 {
326 326 const struct super_operations *op = inode->i_sb->s_op;
327 327  
328   - if (delete && op->delete_inode) {
  328 + if (op->evict_inode) {
  329 + op->evict_inode(inode);
  330 + } else if (delete && op->delete_inode) {
329 331 op->delete_inode(inode);
330 332 } else {
331 333 if (inode->i_data.nrpages)
... ... @@ -1563,6 +1563,7 @@
1563 1563 void (*dirty_inode) (struct inode *);
1564 1564 int (*write_inode) (struct inode *, struct writeback_control *wbc);
1565 1565 void (*drop_inode) (struct inode *);
  1566 + void (*evict_inode) (struct inode *);
1566 1567 void (*delete_inode) (struct inode *);
1567 1568 void (*put_super) (struct super_block *);
1568 1569 void (*write_super) (struct super_block *);