diff options
author | Bryan Schumaker <bjschuma@netapp.com> | 2012-07-30 16:05:23 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-07-30 19:06:41 -0400 |
commit | ddda8e0aa8b955e20cb80908189bfa154ab54837 (patch) | |
tree | ff5b1041ce86c76519c1b824161ce5d7ad2e49db /fs/nfs/dir.c | |
parent | fac1e8e4ef417e958060a6c3a061cc1a180bd8ae (diff) |
NFS: Convert v2 into a module
The module (nfs2.ko) will be created in the same directory as nfs.ko and
will be automatically loaded the first time you try to mount over NFS v2.
Signed-off-by: Bryan Schumaker <bjschuma@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/dir.c')
-rw-r--r-- | fs/nfs/dir.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index d49f1b9cd3fd..c382a6d5e177 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c | |||
@@ -17,6 +17,7 @@ | |||
17 | * 6 Jun 1999 Cache readdir lookups in the page cache. -DaveM | 17 | * 6 Jun 1999 Cache readdir lookups in the page cache. -DaveM |
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include <linux/module.h> | ||
20 | #include <linux/time.h> | 21 | #include <linux/time.h> |
21 | #include <linux/errno.h> | 22 | #include <linux/errno.h> |
22 | #include <linux/stat.h> | 23 | #include <linux/stat.h> |
@@ -1196,6 +1197,7 @@ const struct dentry_operations nfs_dentry_operations = { | |||
1196 | .d_automount = nfs_d_automount, | 1197 | .d_automount = nfs_d_automount, |
1197 | .d_release = nfs_d_release, | 1198 | .d_release = nfs_d_release, |
1198 | }; | 1199 | }; |
1200 | EXPORT_SYMBOL_GPL(nfs_dentry_operations); | ||
1199 | 1201 | ||
1200 | struct dentry *nfs_lookup(struct inode *dir, struct dentry * dentry, unsigned int flags) | 1202 | struct dentry *nfs_lookup(struct inode *dir, struct dentry * dentry, unsigned int flags) |
1201 | { | 1203 | { |
@@ -1263,6 +1265,7 @@ out: | |||
1263 | nfs_free_fhandle(fhandle); | 1265 | nfs_free_fhandle(fhandle); |
1264 | return res; | 1266 | return res; |
1265 | } | 1267 | } |
1268 | EXPORT_SYMBOL_GPL(nfs_lookup); | ||
1266 | 1269 | ||
1267 | #ifdef CONFIG_NFS_V4 | 1270 | #ifdef CONFIG_NFS_V4 |
1268 | static int nfs4_lookup_revalidate(struct dentry *, unsigned int); | 1271 | static int nfs4_lookup_revalidate(struct dentry *, unsigned int); |
@@ -1508,6 +1511,7 @@ out_error: | |||
1508 | dput(parent); | 1511 | dput(parent); |
1509 | return error; | 1512 | return error; |
1510 | } | 1513 | } |
1514 | EXPORT_SYMBOL_GPL(nfs_instantiate); | ||
1511 | 1515 | ||
1512 | /* | 1516 | /* |
1513 | * Following a failed create operation, we drop the dentry rather | 1517 | * Following a failed create operation, we drop the dentry rather |
@@ -1536,6 +1540,7 @@ out_err: | |||
1536 | d_drop(dentry); | 1540 | d_drop(dentry); |
1537 | return error; | 1541 | return error; |
1538 | } | 1542 | } |
1543 | EXPORT_SYMBOL_GPL(nfs_create); | ||
1539 | 1544 | ||
1540 | /* | 1545 | /* |
1541 | * See comments for nfs_proc_create regarding failed operations. | 1546 | * See comments for nfs_proc_create regarding failed operations. |
@@ -1563,6 +1568,7 @@ out_err: | |||
1563 | d_drop(dentry); | 1568 | d_drop(dentry); |
1564 | return status; | 1569 | return status; |
1565 | } | 1570 | } |
1571 | EXPORT_SYMBOL_GPL(nfs_mknod); | ||
1566 | 1572 | ||
1567 | /* | 1573 | /* |
1568 | * See comments for nfs_proc_create regarding failed operations. | 1574 | * See comments for nfs_proc_create regarding failed operations. |
@@ -1586,6 +1592,7 @@ out_err: | |||
1586 | d_drop(dentry); | 1592 | d_drop(dentry); |
1587 | return error; | 1593 | return error; |
1588 | } | 1594 | } |
1595 | EXPORT_SYMBOL_GPL(nfs_mkdir); | ||
1589 | 1596 | ||
1590 | static void nfs_dentry_handle_enoent(struct dentry *dentry) | 1597 | static void nfs_dentry_handle_enoent(struct dentry *dentry) |
1591 | { | 1598 | { |
@@ -1609,6 +1616,7 @@ int nfs_rmdir(struct inode *dir, struct dentry *dentry) | |||
1609 | 1616 | ||
1610 | return error; | 1617 | return error; |
1611 | } | 1618 | } |
1619 | EXPORT_SYMBOL_GPL(nfs_rmdir); | ||
1612 | 1620 | ||
1613 | /* | 1621 | /* |
1614 | * Remove a file after making sure there are no pending writes, | 1622 | * Remove a file after making sure there are no pending writes, |
@@ -1680,6 +1688,7 @@ int nfs_unlink(struct inode *dir, struct dentry *dentry) | |||
1680 | d_rehash(dentry); | 1688 | d_rehash(dentry); |
1681 | return error; | 1689 | return error; |
1682 | } | 1690 | } |
1691 | EXPORT_SYMBOL_GPL(nfs_unlink); | ||
1683 | 1692 | ||
1684 | /* | 1693 | /* |
1685 | * To create a symbolic link, most file systems instantiate a new inode, | 1694 | * To create a symbolic link, most file systems instantiate a new inode, |
@@ -1750,6 +1759,7 @@ int nfs_symlink(struct inode *dir, struct dentry *dentry, const char *symname) | |||
1750 | 1759 | ||
1751 | return 0; | 1760 | return 0; |
1752 | } | 1761 | } |
1762 | EXPORT_SYMBOL_GPL(nfs_symlink); | ||
1753 | 1763 | ||
1754 | int | 1764 | int |
1755 | nfs_link(struct dentry *old_dentry, struct inode *dir, struct dentry *dentry) | 1765 | nfs_link(struct dentry *old_dentry, struct inode *dir, struct dentry *dentry) |
@@ -1771,6 +1781,7 @@ nfs_link(struct dentry *old_dentry, struct inode *dir, struct dentry *dentry) | |||
1771 | } | 1781 | } |
1772 | return error; | 1782 | return error; |
1773 | } | 1783 | } |
1784 | EXPORT_SYMBOL_GPL(nfs_link); | ||
1774 | 1785 | ||
1775 | /* | 1786 | /* |
1776 | * RENAME | 1787 | * RENAME |
@@ -1869,6 +1880,7 @@ out: | |||
1869 | dput(dentry); | 1880 | dput(dentry); |
1870 | return error; | 1881 | return error; |
1871 | } | 1882 | } |
1883 | EXPORT_SYMBOL_GPL(nfs_rename); | ||
1872 | 1884 | ||
1873 | static DEFINE_SPINLOCK(nfs_access_lru_lock); | 1885 | static DEFINE_SPINLOCK(nfs_access_lru_lock); |
1874 | static LIST_HEAD(nfs_access_lru_list); | 1886 | static LIST_HEAD(nfs_access_lru_list); |
@@ -2188,6 +2200,7 @@ out_notsup: | |||
2188 | res = generic_permission(inode, mask); | 2200 | res = generic_permission(inode, mask); |
2189 | goto out; | 2201 | goto out; |
2190 | } | 2202 | } |
2203 | EXPORT_SYMBOL_GPL(nfs_permission); | ||
2191 | 2204 | ||
2192 | /* | 2205 | /* |
2193 | * Local variables: | 2206 | * Local variables: |