Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

fs/ntfs3: Change destroy_inode to free_inode

Many filesystems already use free_inode callback,
so we will use it too from now on.

Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>

+4 -16
+4 -16
fs/ntfs3/super.c
··· 435 435 return NULL; 436 436 437 437 memset(ni, 0, offsetof(struct ntfs_inode, vfs_inode)); 438 - 439 438 mutex_init(&ni->ni_lock); 440 - 441 439 return &ni->vfs_inode; 442 440 } 443 441 444 - static void ntfs_i_callback(struct rcu_head *head) 442 + static void ntfs_free_inode(struct inode *inode) 445 443 { 446 - struct inode *inode = container_of(head, struct inode, i_rcu); 447 444 struct ntfs_inode *ni = ntfs_i(inode); 448 445 449 446 mutex_destroy(&ni->ni_lock); 450 - 451 447 kmem_cache_free(ntfs_inode_cachep, ni); 452 - } 453 - 454 - static void ntfs_destroy_inode(struct inode *inode) 455 - { 456 - call_rcu(&inode->i_rcu, ntfs_i_callback); 457 448 } 458 449 459 450 static void init_once(void *foo) ··· 612 621 613 622 static const struct super_operations ntfs_sops = { 614 623 .alloc_inode = ntfs_alloc_inode, 615 - .destroy_inode = ntfs_destroy_inode, 624 + .free_inode = ntfs_free_inode, 616 625 .evict_inode = ntfs_evict_inode, 617 626 .put_super = ntfs_put_super, 618 627 .statfs = ntfs_statfs, ··· 1508 1517 1509 1518 static void __exit exit_ntfs_fs(void) 1510 1519 { 1511 - if (ntfs_inode_cachep) { 1512 - rcu_barrier(); 1513 - kmem_cache_destroy(ntfs_inode_cachep); 1514 - } 1515 - 1520 + rcu_barrier(); 1521 + kmem_cache_destroy(ntfs_inode_cachep); 1516 1522 unregister_filesystem(&ntfs_fs_type); 1517 1523 ntfs3_exit_bitmap(); 1518 1524 }