mirror of
https://github.com/torvalds/linux.git
synced 2024-10-23 05:30:55 +00:00
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>
This commit is contained in:
parent
b4272d4c81
commit
be7ce4161f
|
@ -325,7 +325,9 @@ static void evict(struct inode *inode, int delete)
|
||||||
{
|
{
|
||||||
const struct super_operations *op = inode->i_sb->s_op;
|
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);
|
op->delete_inode(inode);
|
||||||
} else {
|
} else {
|
||||||
if (inode->i_data.nrpages)
|
if (inode->i_data.nrpages)
|
||||||
|
|
|
@ -1563,6 +1563,7 @@ struct super_operations {
|
||||||
void (*dirty_inode) (struct inode *);
|
void (*dirty_inode) (struct inode *);
|
||||||
int (*write_inode) (struct inode *, struct writeback_control *wbc);
|
int (*write_inode) (struct inode *, struct writeback_control *wbc);
|
||||||
void (*drop_inode) (struct inode *);
|
void (*drop_inode) (struct inode *);
|
||||||
|
void (*evict_inode) (struct inode *);
|
||||||
void (*delete_inode) (struct inode *);
|
void (*delete_inode) (struct inode *);
|
||||||
void (*put_super) (struct super_block *);
|
void (*put_super) (struct super_block *);
|
||||||
void (*write_super) (struct super_block *);
|
void (*write_super) (struct super_block *);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user