summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/inode.c4
-rw-r--r--include/linux/fs.h1
2 files changed, 4 insertions, 1 deletions
diff --git a/fs/inode.c b/fs/inode.c
index 60cb25969762..474a72f571a4 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -325,7 +325,9 @@ static void evict(struct inode *inode, int delete)
{
const struct super_operations *op = inode->i_sb->s_op;
- if (delete && op->delete_inode) {
+ if (op->evict_inode) {
+ op->evict_inode(inode);
+ } else if (delete && op->delete_inode) {
op->delete_inode(inode);
} else {
if (inode->i_data.nrpages)
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 218693d8d446..ce50be4b0b41 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1563,6 +1563,7 @@ struct super_operations {
void (*dirty_inode) (struct inode *);
int (*write_inode) (struct inode *, struct writeback_control *wbc);
void (*drop_inode) (struct inode *);
+ void (*evict_inode) (struct inode *);
void (*delete_inode) (struct inode *);
void (*put_super) (struct super_block *);
void (*write_super) (struct super_block *);