aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2006-06-09 09:34:31 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2006-06-09 09:34:31 -0400
commit860de07139980afe9856cc31eb5efbf321bbcea4 (patch)
treee32a6c758b299f62978426c7e263f6f554678731 /fs
parent87e4ba1a62af8e05ee3e8f8aaca622714386ffb0 (diff)
NFS: Fix compile errors introduced by referrals patches
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/nfs/inode.c37
1 files changed, 26 insertions, 11 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index 648f593de0fe..550a84dd41a2 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -2444,6 +2444,20 @@ static struct file_system_type clone_nfs4_fs_type = {
2444 .fs_flags = FS_ODD_RENAME|FS_REVAL_DOT|FS_BINARY_MOUNTDATA, 2444 .fs_flags = FS_ODD_RENAME|FS_REVAL_DOT|FS_BINARY_MOUNTDATA,
2445}; 2445};
2446 2446
2447static struct vfsmount *nfs_do_clone_mount(struct nfs_server *server, char *devname, struct nfs_clone_mount *mountdata)
2448{
2449 struct vfsmount *mnt = NULL;
2450 switch (server->rpc_ops->version) {
2451 case 2:
2452 case 3:
2453 mnt = vfs_kern_mount(&clone_nfs_fs_type, 0, devname, &mountdata);
2454 break;
2455 case 4:
2456 mnt = vfs_kern_mount(&clone_nfs4_fs_type, 0, devname, mountdata);
2457 }
2458 return mnt;
2459}
2460
2447#define nfs4_init_once(nfsi) \ 2461#define nfs4_init_once(nfsi) \
2448 do { \ 2462 do { \
2449 INIT_LIST_HEAD(&(nfsi)->open_states); \ 2463 INIT_LIST_HEAD(&(nfsi)->open_states); \
@@ -2477,6 +2491,10 @@ static inline void unregister_nfs4fs(void)
2477 do { } while (0) 2491 do { } while (0)
2478#define register_nfs4fs() (0) 2492#define register_nfs4fs() (0)
2479#define unregister_nfs4fs() 2493#define unregister_nfs4fs()
2494static struct vfsmount *nfs_do_clone_mount(struct nfs_server *server, char *devname, struct nfs_clone_mount *mountdata)
2495{
2496 return vfs_kern_mount(&clone_nfs_fs_type, 0, devname, &mountdata);
2497}
2480#endif 2498#endif
2481 2499
2482static inline char *nfs_devname(const struct vfsmount *mnt_parent, 2500static inline char *nfs_devname(const struct vfsmount *mnt_parent,
@@ -2517,17 +2535,7 @@ struct vfsmount *nfs_do_submount(const struct vfsmount *mnt_parent,
2517 mnt = (struct vfsmount *)devname; 2535 mnt = (struct vfsmount *)devname;
2518 if (IS_ERR(devname)) 2536 if (IS_ERR(devname))
2519 goto free_page; 2537 goto free_page;
2520 switch (NFS_SB(mnt_parent->mnt_sb)->rpc_ops->version) { 2538 mnt = nfs_do_clone_mount(NFS_SB(mnt_parent->mnt_sb), devname, &mountdata);
2521 case 2:
2522 case 3:
2523 mnt = vfs_kern_mount(&clone_nfs_fs_type, 0, devname, &mountdata);
2524 break;
2525 case 4:
2526 mnt = vfs_kern_mount(&clone_nfs4_fs_type, 0, devname, &mountdata);
2527 break;
2528 default:
2529 BUG();
2530 }
2531free_page: 2539free_page:
2532 free_page((unsigned long)page); 2540 free_page((unsigned long)page);
2533out: 2541out:
@@ -2535,6 +2543,7 @@ out:
2535 return mnt; 2543 return mnt;
2536} 2544}
2537 2545
2546#ifdef CONFIG_NFS_V4
2538/* Check if fs_root is valid */ 2547/* Check if fs_root is valid */
2539static inline char *nfs4_pathname_string(struct nfs4_pathname *pathname, char *buffer, ssize_t buflen) 2548static inline char *nfs4_pathname_string(struct nfs4_pathname *pathname, char *buffer, ssize_t buflen)
2540{ 2549{
@@ -2789,6 +2798,12 @@ out:
2789 dprintk("%s: done\n", __FUNCTION__); 2798 dprintk("%s: done\n", __FUNCTION__);
2790 return mnt; 2799 return mnt;
2791} 2800}
2801#else
2802struct vfsmount *nfs_do_refmount(const struct vfsmount *mnt_parent, struct dentry *dentry)
2803{
2804 return ERR_PTR(-ENOENT);
2805}
2806#endif
2792 2807
2793extern int nfs_init_nfspagecache(void); 2808extern int nfs_init_nfspagecache(void);
2794extern void nfs_destroy_nfspagecache(void); 2809extern void nfs_destroy_nfspagecache(void);