aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs/inode.c')
-rw-r--r--fs/nfs/inode.c64
1 files changed, 32 insertions, 32 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index 78dfc3e895ec..2ed6138f32ad 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -82,6 +82,7 @@ int nfs_wait_bit_killable(void *word)
82 freezable_schedule(); 82 freezable_schedule();
83 return 0; 83 return 0;
84} 84}
85EXPORT_SYMBOL_GPL(nfs_wait_bit_killable);
85 86
86/** 87/**
87 * nfs_compat_user_ino64 - returns the user-visible inode number 88 * nfs_compat_user_ino64 - returns the user-visible inode number
@@ -117,6 +118,7 @@ void nfs_clear_inode(struct inode *inode)
117 nfs_access_zap_cache(inode); 118 nfs_access_zap_cache(inode);
118 nfs_fscache_release_inode_cookie(inode); 119 nfs_fscache_release_inode_cookie(inode);
119} 120}
121EXPORT_SYMBOL_GPL(nfs_clear_inode);
120 122
121void nfs_evict_inode(struct inode *inode) 123void nfs_evict_inode(struct inode *inode)
122{ 124{
@@ -393,6 +395,7 @@ out_no_inode:
393 dprintk("nfs_fhget: iget failed with error %ld\n", PTR_ERR(inode)); 395 dprintk("nfs_fhget: iget failed with error %ld\n", PTR_ERR(inode));
394 goto out; 396 goto out;
395} 397}
398EXPORT_SYMBOL_GPL(nfs_fhget);
396 399
397#define NFS_VALID_ATTRS (ATTR_MODE|ATTR_UID|ATTR_GID|ATTR_SIZE|ATTR_ATIME|ATTR_ATIME_SET|ATTR_MTIME|ATTR_MTIME_SET|ATTR_FILE|ATTR_OPEN) 400#define NFS_VALID_ATTRS (ATTR_MODE|ATTR_UID|ATTR_GID|ATTR_SIZE|ATTR_ATIME|ATTR_ATIME_SET|ATTR_MTIME|ATTR_MTIME_SET|ATTR_FILE|ATTR_OPEN)
398 401
@@ -655,6 +658,7 @@ struct nfs_open_context *alloc_nfs_open_context(struct dentry *dentry, fmode_t f
655 ctx->mdsthreshold = NULL; 658 ctx->mdsthreshold = NULL;
656 return ctx; 659 return ctx;
657} 660}
661EXPORT_SYMBOL_GPL(alloc_nfs_open_context);
658 662
659struct nfs_open_context *get_nfs_open_context(struct nfs_open_context *ctx) 663struct nfs_open_context *get_nfs_open_context(struct nfs_open_context *ctx)
660{ 664{
@@ -662,6 +666,7 @@ struct nfs_open_context *get_nfs_open_context(struct nfs_open_context *ctx)
662 atomic_inc(&ctx->lock_context.count); 666 atomic_inc(&ctx->lock_context.count);
663 return ctx; 667 return ctx;
664} 668}
669EXPORT_SYMBOL_GPL(get_nfs_open_context);
665 670
666static void __put_nfs_open_context(struct nfs_open_context *ctx, int is_sync) 671static void __put_nfs_open_context(struct nfs_open_context *ctx, int is_sync)
667{ 672{
@@ -689,6 +694,7 @@ void put_nfs_open_context(struct nfs_open_context *ctx)
689{ 694{
690 __put_nfs_open_context(ctx, 0); 695 __put_nfs_open_context(ctx, 0);
691} 696}
697EXPORT_SYMBOL_GPL(put_nfs_open_context);
692 698
693/* 699/*
694 * Ensure that mmap has a recent RPC credential for use when writing out 700 * Ensure that mmap has a recent RPC credential for use when writing out
@@ -704,6 +710,7 @@ void nfs_file_set_open_context(struct file *filp, struct nfs_open_context *ctx)
704 list_add(&ctx->list, &nfsi->open_files); 710 list_add(&ctx->list, &nfsi->open_files);
705 spin_unlock(&inode->i_lock); 711 spin_unlock(&inode->i_lock);
706} 712}
713EXPORT_SYMBOL_GPL(nfs_file_set_open_context);
707 714
708/* 715/*
709 * Given an inode, search for an open context with the desired characteristics 716 * Given an inode, search for an open context with the desired characteristics
@@ -1497,11 +1504,12 @@ struct inode *nfs_alloc_inode(struct super_block *sb)
1497 nfsi->acl_access = ERR_PTR(-EAGAIN); 1504 nfsi->acl_access = ERR_PTR(-EAGAIN);
1498 nfsi->acl_default = ERR_PTR(-EAGAIN); 1505 nfsi->acl_default = ERR_PTR(-EAGAIN);
1499#endif 1506#endif
1500#ifdef CONFIG_NFS_V4 1507#if IS_ENABLED(CONFIG_NFS_V4)
1501 nfsi->nfs4_acl = NULL; 1508 nfsi->nfs4_acl = NULL;
1502#endif /* CONFIG_NFS_V4 */ 1509#endif /* CONFIG_NFS_V4 */
1503 return &nfsi->vfs_inode; 1510 return &nfsi->vfs_inode;
1504} 1511}
1512EXPORT_SYMBOL_GPL(nfs_alloc_inode);
1505 1513
1506static void nfs_i_callback(struct rcu_head *head) 1514static void nfs_i_callback(struct rcu_head *head)
1507{ 1515{
@@ -1513,10 +1521,11 @@ void nfs_destroy_inode(struct inode *inode)
1513{ 1521{
1514 call_rcu(&inode->i_rcu, nfs_i_callback); 1522 call_rcu(&inode->i_rcu, nfs_i_callback);
1515} 1523}
1524EXPORT_SYMBOL_GPL(nfs_destroy_inode);
1516 1525
1517static inline void nfs4_init_once(struct nfs_inode *nfsi) 1526static inline void nfs4_init_once(struct nfs_inode *nfsi)
1518{ 1527{
1519#ifdef CONFIG_NFS_V4 1528#if IS_ENABLED(CONFIG_NFS_V4)
1520 INIT_LIST_HEAD(&nfsi->open_states); 1529 INIT_LIST_HEAD(&nfsi->open_states);
1521 nfsi->delegation = NULL; 1530 nfsi->delegation = NULL;
1522 nfsi->delegation_state = 0; 1531 nfsi->delegation_state = 0;
@@ -1562,6 +1571,7 @@ static void nfs_destroy_inodecache(void)
1562} 1571}
1563 1572
1564struct workqueue_struct *nfsiod_workqueue; 1573struct workqueue_struct *nfsiod_workqueue;
1574EXPORT_SYMBOL_GPL(nfsiod_workqueue);
1565 1575
1566/* 1576/*
1567 * start up the nfsiod workqueue 1577 * start up the nfsiod workqueue
@@ -1622,90 +1632,80 @@ static int __init init_nfs_fs(void)
1622 1632
1623 err = nfs_dns_resolver_init(); 1633 err = nfs_dns_resolver_init();
1624 if (err < 0) 1634 if (err < 0)
1625 goto out11; 1635 goto out10;;
1626 1636
1627 err = register_pernet_subsys(&nfs_net_ops); 1637 err = register_pernet_subsys(&nfs_net_ops);
1628 if (err < 0) 1638 if (err < 0)
1629 goto out10; 1639 goto out9;
1630 1640
1631 err = nfs_fscache_register(); 1641 err = nfs_fscache_register();
1632 if (err < 0) 1642 if (err < 0)
1633 goto out9; 1643 goto out8;
1634 1644
1635 err = nfsiod_start(); 1645 err = nfsiod_start();
1636 if (err) 1646 if (err)
1637 goto out8; 1647 goto out7;
1638 1648
1639 err = nfs_fs_proc_init(); 1649 err = nfs_fs_proc_init();
1640 if (err) 1650 if (err)
1641 goto out7; 1651 goto out6;
1642 1652
1643 err = nfs_init_nfspagecache(); 1653 err = nfs_init_nfspagecache();
1644 if (err) 1654 if (err)
1645 goto out6; 1655 goto out5;
1646 1656
1647 err = nfs_init_inodecache(); 1657 err = nfs_init_inodecache();
1648 if (err) 1658 if (err)
1649 goto out5; 1659 goto out4;
1650 1660
1651 err = nfs_init_readpagecache(); 1661 err = nfs_init_readpagecache();
1652 if (err) 1662 if (err)
1653 goto out4; 1663 goto out3;
1654 1664
1655 err = nfs_init_writepagecache(); 1665 err = nfs_init_writepagecache();
1656 if (err) 1666 if (err)
1657 goto out3; 1667 goto out2;
1658 1668
1659 err = nfs_init_directcache(); 1669 err = nfs_init_directcache();
1660 if (err) 1670 if (err)
1661 goto out2; 1671 goto out1;
1662 1672
1663#ifdef CONFIG_PROC_FS 1673#ifdef CONFIG_PROC_FS
1664 rpc_proc_register(&init_net, &nfs_rpcstat); 1674 rpc_proc_register(&init_net, &nfs_rpcstat);
1665#endif 1675#endif
1666
1667 err = nfs_register_versions();
1668 if (err)
1669 goto out1;
1670
1671 if ((err = register_nfs_fs()) != 0) 1676 if ((err = register_nfs_fs()) != 0)
1672 goto out0; 1677 goto out0;
1673 1678
1674 return 0; 1679 return 0;
1675out0: 1680out0:
1676 nfs_unregister_versions();
1677out1:
1678#ifdef CONFIG_PROC_FS 1681#ifdef CONFIG_PROC_FS
1679 rpc_proc_unregister(&init_net, "nfs"); 1682 rpc_proc_unregister(&init_net, "nfs");
1680#endif 1683#endif
1681 nfs_destroy_directcache(); 1684 nfs_destroy_directcache();
1682out2: 1685out1:
1683 nfs_destroy_writepagecache(); 1686 nfs_destroy_writepagecache();
1684out3: 1687out2:
1685 nfs_destroy_readpagecache(); 1688 nfs_destroy_readpagecache();
1686out4: 1689out3:
1687 nfs_destroy_inodecache(); 1690 nfs_destroy_inodecache();
1688out5: 1691out4:
1689 nfs_destroy_nfspagecache(); 1692 nfs_destroy_nfspagecache();
1690out6: 1693out5:
1691 nfs_fs_proc_exit(); 1694 nfs_fs_proc_exit();
1692out7: 1695out6:
1693 nfsiod_stop(); 1696 nfsiod_stop();
1694out8: 1697out7:
1695 nfs_fscache_unregister(); 1698 nfs_fscache_unregister();
1696out9: 1699out8:
1697 unregister_pernet_subsys(&nfs_net_ops); 1700 unregister_pernet_subsys(&nfs_net_ops);
1698out10: 1701out9:
1699 nfs_dns_resolver_destroy(); 1702 nfs_dns_resolver_destroy();
1700out11: 1703out10:
1701 return err; 1704 return err;
1702} 1705}
1703 1706
1704static void __exit exit_nfs_fs(void) 1707static void __exit exit_nfs_fs(void)
1705{ 1708{
1706#ifdef CONFIG_NFS_V4
1707 exit_nfs_v4();
1708#endif
1709 nfs_destroy_directcache(); 1709 nfs_destroy_directcache();
1710 nfs_destroy_writepagecache(); 1710 nfs_destroy_writepagecache();
1711 nfs_destroy_readpagecache(); 1711 nfs_destroy_readpagecache();