diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-05-07 13:57:05 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-05-07 13:57:05 -0400 |
commit | 168e153d5ebbdd6a3fa85db1cc4879ed4b7030e0 (patch) | |
tree | 73d8583ff7a53a05f95e331ac6468e3741f20d10 /fs/afs | |
parent | 8ff468c29e9a9c3afe9152c10c7b141343270bf3 (diff) | |
parent | f276ae0dd6d0b5bfbcb51178a63f06dc035f4cc4 (diff) |
Merge branch 'work.icache' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull vfs inode freeing updates from Al Viro:
"Introduction of separate method for RCU-delayed part of
->destroy_inode() (if any).
Pretty much as posted, except that destroy_inode() stashes
->free_inode into the victim (anon-unioned with ->i_fops) before
scheduling i_callback() and the last two patches (sockfs conversion
and folding struct socket_wq into struct socket) are excluded - that
pair should go through netdev once davem reopens his tree"
* 'work.icache' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (58 commits)
orangefs: make use of ->free_inode()
shmem: make use of ->free_inode()
hugetlb: make use of ->free_inode()
overlayfs: make use of ->free_inode()
jfs: switch to ->free_inode()
fuse: switch to ->free_inode()
ext4: make use of ->free_inode()
ecryptfs: make use of ->free_inode()
ceph: use ->free_inode()
btrfs: use ->free_inode()
afs: switch to use of ->free_inode()
dax: make use of ->free_inode()
ntfs: switch to ->free_inode()
securityfs: switch to ->free_inode()
apparmor: switch to ->free_inode()
rpcpipe: switch to ->free_inode()
bpf: switch to ->free_inode()
mqueue: switch to ->free_inode()
ufs: switch to ->free_inode()
coda: switch to ->free_inode()
...
Diffstat (limited to 'fs/afs')
-rw-r--r-- | fs/afs/super.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/afs/super.c b/fs/afs/super.c index 5adf012b8e27..bab89763119b 100644 --- a/fs/afs/super.c +++ b/fs/afs/super.c | |||
@@ -33,6 +33,7 @@ static void afs_i_init_once(void *foo); | |||
33 | static void afs_kill_super(struct super_block *sb); | 33 | static void afs_kill_super(struct super_block *sb); |
34 | static struct inode *afs_alloc_inode(struct super_block *sb); | 34 | static struct inode *afs_alloc_inode(struct super_block *sb); |
35 | static void afs_destroy_inode(struct inode *inode); | 35 | static void afs_destroy_inode(struct inode *inode); |
36 | static void afs_free_inode(struct inode *inode); | ||
36 | static int afs_statfs(struct dentry *dentry, struct kstatfs *buf); | 37 | static int afs_statfs(struct dentry *dentry, struct kstatfs *buf); |
37 | static int afs_show_devname(struct seq_file *m, struct dentry *root); | 38 | static int afs_show_devname(struct seq_file *m, struct dentry *root); |
38 | static int afs_show_options(struct seq_file *m, struct dentry *root); | 39 | static int afs_show_options(struct seq_file *m, struct dentry *root); |
@@ -56,6 +57,7 @@ static const struct super_operations afs_super_ops = { | |||
56 | .alloc_inode = afs_alloc_inode, | 57 | .alloc_inode = afs_alloc_inode, |
57 | .drop_inode = afs_drop_inode, | 58 | .drop_inode = afs_drop_inode, |
58 | .destroy_inode = afs_destroy_inode, | 59 | .destroy_inode = afs_destroy_inode, |
60 | .free_inode = afs_free_inode, | ||
59 | .evict_inode = afs_evict_inode, | 61 | .evict_inode = afs_evict_inode, |
60 | .show_devname = afs_show_devname, | 62 | .show_devname = afs_show_devname, |
61 | .show_options = afs_show_options, | 63 | .show_options = afs_show_options, |
@@ -660,11 +662,9 @@ static struct inode *afs_alloc_inode(struct super_block *sb) | |||
660 | return &vnode->vfs_inode; | 662 | return &vnode->vfs_inode; |
661 | } | 663 | } |
662 | 664 | ||
663 | static void afs_i_callback(struct rcu_head *head) | 665 | static void afs_free_inode(struct inode *inode) |
664 | { | 666 | { |
665 | struct inode *inode = container_of(head, struct inode, i_rcu); | 667 | kmem_cache_free(afs_inode_cachep, AFS_FS_I(inode)); |
666 | struct afs_vnode *vnode = AFS_FS_I(inode); | ||
667 | kmem_cache_free(afs_inode_cachep, vnode); | ||
668 | } | 668 | } |
669 | 669 | ||
670 | /* | 670 | /* |
@@ -680,7 +680,6 @@ static void afs_destroy_inode(struct inode *inode) | |||
680 | 680 | ||
681 | ASSERTCMP(vnode->cb_interest, ==, NULL); | 681 | ASSERTCMP(vnode->cb_interest, ==, NULL); |
682 | 682 | ||
683 | call_rcu(&inode->i_rcu, afs_i_callback); | ||
684 | atomic_dec(&afs_count_active_inodes); | 683 | atomic_dec(&afs_count_active_inodes); |
685 | } | 684 | } |
686 | 685 | ||