aboutsummaryrefslogtreecommitdiffstats
path: root/fs/hugetlbfs
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2010-06-04 19:52:12 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2010-08-09 16:47:47 -0400
commit2bbbda308f5ca027d4fd721f914c0cab88d49aec (patch)
tree07c10b18c4902cde59a991c6f999a630735e1720 /fs/hugetlbfs
parentbe7ce4161f9e6bf2497f90337d1214aa6ee06e15 (diff)
switch hugetlbfs to ->evict_inode()
The first spoils - hugetlb can use default ->drop_inode() now. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/hugetlbfs')
-rw-r--r--fs/hugetlbfs/inode.c22
1 files changed, 2 insertions, 20 deletions
diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c
index d5f019d48b0..bf1a2f400e7 100644
--- a/fs/hugetlbfs/inode.c
+++ b/fs/hugetlbfs/inode.c
@@ -371,29 +371,12 @@ static void truncate_hugepages(struct inode *inode, loff_t lstart)
371 hugetlb_unreserve_pages(inode, start, freed); 371 hugetlb_unreserve_pages(inode, start, freed);
372} 372}
373 373
374static void hugetlbfs_delete_inode(struct inode *inode) 374static void hugetlbfs_evict_inode(struct inode *inode)
375{ 375{
376 truncate_hugepages(inode, 0); 376 truncate_hugepages(inode, 0);
377 clear_inode(inode); 377 clear_inode(inode);
378} 378}
379 379
380static void hugetlbfs_forget_inode(struct inode *inode) __releases(inode_lock)
381{
382 if (generic_detach_inode(inode)) {
383 truncate_hugepages(inode, 0);
384 clear_inode(inode);
385 destroy_inode(inode);
386 }
387}
388
389static void hugetlbfs_drop_inode(struct inode *inode)
390{
391 if (!inode->i_nlink)
392 generic_delete_inode(inode);
393 else
394 hugetlbfs_forget_inode(inode);
395}
396
397static inline void 380static inline void
398hugetlb_vmtruncate_list(struct prio_tree_root *root, pgoff_t pgoff) 381hugetlb_vmtruncate_list(struct prio_tree_root *root, pgoff_t pgoff)
399{ 382{
@@ -713,9 +696,8 @@ static const struct inode_operations hugetlbfs_inode_operations = {
713static const struct super_operations hugetlbfs_ops = { 696static const struct super_operations hugetlbfs_ops = {
714 .alloc_inode = hugetlbfs_alloc_inode, 697 .alloc_inode = hugetlbfs_alloc_inode,
715 .destroy_inode = hugetlbfs_destroy_inode, 698 .destroy_inode = hugetlbfs_destroy_inode,
699 .evict_inode = hugetlbfs_evict_inode,
716 .statfs = hugetlbfs_statfs, 700 .statfs = hugetlbfs_statfs,
717 .delete_inode = hugetlbfs_delete_inode,
718 .drop_inode = hugetlbfs_drop_inode,
719 .put_super = hugetlbfs_put_super, 701 .put_super = hugetlbfs_put_super,
720 .show_options = generic_show_options, 702 .show_options = generic_show_options,
721}; 703};