diff options
Diffstat (limited to 'fs/nfs/inode.c')
-rw-r--r-- | fs/nfs/inode.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index e67e31c73416..ce00b704452c 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c | |||
@@ -1410,9 +1410,9 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr) | |||
1410 | */ | 1410 | */ |
1411 | void nfs4_evict_inode(struct inode *inode) | 1411 | void nfs4_evict_inode(struct inode *inode) |
1412 | { | 1412 | { |
1413 | pnfs_destroy_layout(NFS_I(inode)); | ||
1413 | truncate_inode_pages(&inode->i_data, 0); | 1414 | truncate_inode_pages(&inode->i_data, 0); |
1414 | end_writeback(inode); | 1415 | end_writeback(inode); |
1415 | pnfs_destroy_layout(NFS_I(inode)); | ||
1416 | /* If we are holding a delegation, return it! */ | 1416 | /* If we are holding a delegation, return it! */ |
1417 | nfs_inode_return_delegation_noreclaim(inode); | 1417 | nfs_inode_return_delegation_noreclaim(inode); |
1418 | /* First call standard NFS clear_inode() code */ | 1418 | /* First call standard NFS clear_inode() code */ |
@@ -1438,11 +1438,18 @@ struct inode *nfs_alloc_inode(struct super_block *sb) | |||
1438 | return &nfsi->vfs_inode; | 1438 | return &nfsi->vfs_inode; |
1439 | } | 1439 | } |
1440 | 1440 | ||
1441 | void nfs_destroy_inode(struct inode *inode) | 1441 | static void nfs_i_callback(struct rcu_head *head) |
1442 | { | 1442 | { |
1443 | struct inode *inode = container_of(head, struct inode, i_rcu); | ||
1444 | INIT_LIST_HEAD(&inode->i_dentry); | ||
1443 | kmem_cache_free(nfs_inode_cachep, NFS_I(inode)); | 1445 | kmem_cache_free(nfs_inode_cachep, NFS_I(inode)); |
1444 | } | 1446 | } |
1445 | 1447 | ||
1448 | void nfs_destroy_inode(struct inode *inode) | ||
1449 | { | ||
1450 | call_rcu(&inode->i_rcu, nfs_i_callback); | ||
1451 | } | ||
1452 | |||
1446 | static inline void nfs4_init_once(struct nfs_inode *nfsi) | 1453 | static inline void nfs4_init_once(struct nfs_inode *nfsi) |
1447 | { | 1454 | { |
1448 | #ifdef CONFIG_NFS_V4 | 1455 | #ifdef CONFIG_NFS_V4 |
@@ -1612,6 +1619,7 @@ static void __exit exit_nfs_fs(void) | |||
1612 | #ifdef CONFIG_PROC_FS | 1619 | #ifdef CONFIG_PROC_FS |
1613 | rpc_proc_unregister("nfs"); | 1620 | rpc_proc_unregister("nfs"); |
1614 | #endif | 1621 | #endif |
1622 | nfs_cleanup_cb_ident_idr(); | ||
1615 | unregister_nfs_fs(); | 1623 | unregister_nfs_fs(); |
1616 | nfs_fs_proc_exit(); | 1624 | nfs_fs_proc_exit(); |
1617 | nfsiod_stop(); | 1625 | nfsiod_stop(); |