diff options
Diffstat (limited to 'fs/afs/super.c')
| -rw-r--r-- | fs/afs/super.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/fs/afs/super.c b/fs/afs/super.c index 27201cffece4..f901a9d7c111 100644 --- a/fs/afs/super.c +++ b/fs/afs/super.c | |||
| @@ -498,6 +498,14 @@ static struct inode *afs_alloc_inode(struct super_block *sb) | |||
| 498 | return &vnode->vfs_inode; | 498 | return &vnode->vfs_inode; |
| 499 | } | 499 | } |
| 500 | 500 | ||
| 501 | static void afs_i_callback(struct rcu_head *head) | ||
| 502 | { | ||
| 503 | struct inode *inode = container_of(head, struct inode, i_rcu); | ||
| 504 | struct afs_vnode *vnode = AFS_FS_I(inode); | ||
| 505 | INIT_LIST_HEAD(&inode->i_dentry); | ||
| 506 | kmem_cache_free(afs_inode_cachep, vnode); | ||
| 507 | } | ||
| 508 | |||
| 501 | /* | 509 | /* |
| 502 | * destroy an AFS inode struct | 510 | * destroy an AFS inode struct |
| 503 | */ | 511 | */ |
| @@ -511,7 +519,7 @@ static void afs_destroy_inode(struct inode *inode) | |||
| 511 | 519 | ||
| 512 | ASSERTCMP(vnode->server, ==, NULL); | 520 | ASSERTCMP(vnode->server, ==, NULL); |
| 513 | 521 | ||
| 514 | kmem_cache_free(afs_inode_cachep, vnode); | 522 | call_rcu(&inode->i_rcu, afs_i_callback); |
| 515 | atomic_dec(&afs_count_active_inodes); | 523 | atomic_dec(&afs_count_active_inodes); |
| 516 | } | 524 | } |
| 517 | 525 | ||
