mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
Make ->drop_inode() just return whether inode needs to be dropped
... and let iput_final() do the actual eviction or retention Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
parent
30140837f2
commit
45321ac543
10 changed files with 60 additions and 103 deletions
|
|
@ -2395,7 +2395,7 @@ int btrfs_write_inode(struct inode *inode, struct writeback_control *wbc);
|
|||
void btrfs_dirty_inode(struct inode *inode);
|
||||
struct inode *btrfs_alloc_inode(struct super_block *sb);
|
||||
void btrfs_destroy_inode(struct inode *inode);
|
||||
void btrfs_drop_inode(struct inode *inode);
|
||||
int btrfs_drop_inode(struct inode *inode);
|
||||
int btrfs_init_cachep(void);
|
||||
void btrfs_destroy_cachep(void);
|
||||
long btrfs_ioctl_trans_end(struct file *file);
|
||||
|
|
|
|||
|
|
@ -3943,7 +3943,7 @@ again:
|
|||
if (atomic_read(&inode->i_count) > 1)
|
||||
d_prune_aliases(inode);
|
||||
/*
|
||||
* btrfs_drop_inode will remove it from
|
||||
* btrfs_drop_inode will have it removed from
|
||||
* the inode cache when its usage count
|
||||
* hits zero.
|
||||
*/
|
||||
|
|
@ -6337,13 +6337,14 @@ free:
|
|||
kmem_cache_free(btrfs_inode_cachep, BTRFS_I(inode));
|
||||
}
|
||||
|
||||
void btrfs_drop_inode(struct inode *inode)
|
||||
int btrfs_drop_inode(struct inode *inode)
|
||||
{
|
||||
struct btrfs_root *root = BTRFS_I(inode)->root;
|
||||
if (inode->i_nlink > 0 && btrfs_root_refs(&root->root_item) == 0)
|
||||
generic_delete_inode(inode);
|
||||
|
||||
if (btrfs_root_refs(&root->root_item) == 0)
|
||||
return 1;
|
||||
else
|
||||
generic_drop_inode(inode);
|
||||
return generic_drop_inode(inode);
|
||||
}
|
||||
|
||||
static void init_once(void *foo)
|
||||
|
|
|
|||
Loading…
Reference in a new issue