aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/inode.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2010-06-07 13:43:19 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2010-08-09 16:48:35 -0400
commit45321ac54316eaeeebde0b5f728a1791e500974c (patch)
treec3989dd1a8b4a50168d696aa608941de88da9ade /fs/btrfs/inode.c
parent30140837f256558c943636245ab90897a9455a70 (diff)
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 <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r--fs/btrfs/inode.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index ce02199ec4e5..2c54f04a0bf5 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -3943,7 +3943,7 @@ again:
3943 if (atomic_read(&inode->i_count) > 1) 3943 if (atomic_read(&inode->i_count) > 1)
3944 d_prune_aliases(inode); 3944 d_prune_aliases(inode);
3945 /* 3945 /*
3946 * btrfs_drop_inode will remove it from 3946 * btrfs_drop_inode will have it removed from
3947 * the inode cache when its usage count 3947 * the inode cache when its usage count
3948 * hits zero. 3948 * hits zero.
3949 */ 3949 */
@@ -6337,13 +6337,14 @@ free:
6337 kmem_cache_free(btrfs_inode_cachep, BTRFS_I(inode)); 6337 kmem_cache_free(btrfs_inode_cachep, BTRFS_I(inode));
6338} 6338}
6339 6339
6340void btrfs_drop_inode(struct inode *inode) 6340int btrfs_drop_inode(struct inode *inode)
6341{ 6341{
6342 struct btrfs_root *root = BTRFS_I(inode)->root; 6342 struct btrfs_root *root = BTRFS_I(inode)->root;
6343 if (inode->i_nlink > 0 && btrfs_root_refs(&root->root_item) == 0) 6343
6344 generic_delete_inode(inode); 6344 if (btrfs_root_refs(&root->root_item) == 0)
6345 return 1;
6345 else 6346 else
6346 generic_drop_inode(inode); 6347 return generic_drop_inode(inode);
6347} 6348}
6348 6349
6349static void init_once(void *foo) 6350static void init_once(void *foo)