Trond Myklebust | 55a9759 | 2006-06-09 09:34:19 -0400 | [diff] [blame] | 1 | /* |
| 2 | * linux/fs/nfs/namespace.c |
| 3 | * |
| 4 | * Copyright (C) 2005 Trond Myklebust <Trond.Myklebust@netapp.com> |
David Howells | 54ceac4 | 2006-08-22 20:06:13 -0400 | [diff] [blame] | 5 | * - Modified by David Howells <dhowells@redhat.com> |
Trond Myklebust | 55a9759 | 2006-06-09 09:34:19 -0400 | [diff] [blame] | 6 | * |
| 7 | * NFS namespace |
| 8 | */ |
| 9 | |
Trond Myklebust | 55a9759 | 2006-06-09 09:34:19 -0400 | [diff] [blame] | 10 | #include <linux/dcache.h> |
Tejun Heo | 5a0e3ad | 2010-03-24 17:04:11 +0900 | [diff] [blame] | 11 | #include <linux/gfp.h> |
Trond Myklebust | 55a9759 | 2006-06-09 09:34:19 -0400 | [diff] [blame] | 12 | #include <linux/mount.h> |
| 13 | #include <linux/namei.h> |
| 14 | #include <linux/nfs_fs.h> |
| 15 | #include <linux/string.h> |
| 16 | #include <linux/sunrpc/clnt.h> |
| 17 | #include <linux/vfs.h> |
David Howells | f7b422b | 2006-06-09 09:34:33 -0400 | [diff] [blame] | 18 | #include "internal.h" |
Trond Myklebust | 55a9759 | 2006-06-09 09:34:19 -0400 | [diff] [blame] | 19 | |
| 20 | #define NFSDBG_FACILITY NFSDBG_VFS |
| 21 | |
David Howells | 65f27f3 | 2006-11-22 14:55:48 +0000 | [diff] [blame] | 22 | static void nfs_expire_automounts(struct work_struct *work); |
David Howells | f7b422b | 2006-06-09 09:34:33 -0400 | [diff] [blame] | 23 | |
Adrian Bunk | a3dab29 | 2008-04-14 21:41:32 +0300 | [diff] [blame] | 24 | static LIST_HEAD(nfs_automount_list); |
David Howells | 65f27f3 | 2006-11-22 14:55:48 +0000 | [diff] [blame] | 25 | static DECLARE_DELAYED_WORK(nfs_automount_task, nfs_expire_automounts); |
Trond Myklebust | 51d8fa6 | 2006-06-09 09:34:20 -0400 | [diff] [blame] | 26 | int nfs_mountpoint_expiry_timeout = 500 * HZ; |
| 27 | |
Al Viro | f8ad9c4 | 2011-03-16 06:32:07 -0400 | [diff] [blame] | 28 | static struct vfsmount *nfs_do_submount(struct dentry *dentry, |
Adrian Bunk | 66f3750 | 2006-09-27 01:51:13 -0700 | [diff] [blame] | 29 | struct nfs_fh *fh, |
| 30 | struct nfs_fattr *fattr); |
| 31 | |
Trond Myklebust | 55a9759 | 2006-06-09 09:34:19 -0400 | [diff] [blame] | 32 | /* |
David Howells | f7b422b | 2006-06-09 09:34:33 -0400 | [diff] [blame] | 33 | * nfs_path - reconstruct the path given an arbitrary dentry |
Al Viro | b514f87 | 2011-03-16 06:26:11 -0400 | [diff] [blame] | 34 | * @base - used to return pointer to the end of devname part of path |
David Howells | f7b422b | 2006-06-09 09:34:33 -0400 | [diff] [blame] | 35 | * @dentry - pointer to dentry |
| 36 | * @buffer - result buffer |
| 37 | * @buflen - length of buffer |
| 38 | * |
Al Viro | b514f87 | 2011-03-16 06:26:11 -0400 | [diff] [blame] | 39 | * Helper function for constructing the server pathname |
| 40 | * by arbitrary hashed dentry. |
David Howells | f7b422b | 2006-06-09 09:34:33 -0400 | [diff] [blame] | 41 | * |
| 42 | * This is mainly for use in figuring out the path on the |
Al Viro | b514f87 | 2011-03-16 06:26:11 -0400 | [diff] [blame] | 43 | * server side when automounting on top of an existing partition |
| 44 | * and in generating /proc/mounts and friends. |
David Howells | f7b422b | 2006-06-09 09:34:33 -0400 | [diff] [blame] | 45 | */ |
Al Viro | b514f87 | 2011-03-16 06:26:11 -0400 | [diff] [blame] | 46 | char *nfs_path(char **p, struct dentry *dentry, char *buffer, ssize_t buflen) |
David Howells | f7b422b | 2006-06-09 09:34:33 -0400 | [diff] [blame] | 47 | { |
Nick Piggin | 949854d | 2011-01-07 17:49:37 +1100 | [diff] [blame] | 48 | char *end; |
David Howells | f7b422b | 2006-06-09 09:34:33 -0400 | [diff] [blame] | 49 | int namelen; |
Nick Piggin | 949854d | 2011-01-07 17:49:37 +1100 | [diff] [blame] | 50 | unsigned seq; |
Al Viro | b514f87 | 2011-03-16 06:26:11 -0400 | [diff] [blame] | 51 | const char *base; |
David Howells | f7b422b | 2006-06-09 09:34:33 -0400 | [diff] [blame] | 52 | |
Nick Piggin | 949854d | 2011-01-07 17:49:37 +1100 | [diff] [blame] | 53 | rename_retry: |
| 54 | end = buffer+buflen; |
David Howells | f7b422b | 2006-06-09 09:34:33 -0400 | [diff] [blame] | 55 | *--end = '\0'; |
| 56 | buflen--; |
Nick Piggin | 949854d | 2011-01-07 17:49:37 +1100 | [diff] [blame] | 57 | |
| 58 | seq = read_seqbegin(&rename_lock); |
| 59 | rcu_read_lock(); |
Al Viro | b514f87 | 2011-03-16 06:26:11 -0400 | [diff] [blame] | 60 | while (1) { |
| 61 | spin_lock(&dentry->d_lock); |
| 62 | if (IS_ROOT(dentry)) |
| 63 | break; |
David Howells | f7b422b | 2006-06-09 09:34:33 -0400 | [diff] [blame] | 64 | namelen = dentry->d_name.len; |
| 65 | buflen -= namelen + 1; |
| 66 | if (buflen < 0) |
Josh Triplett | ce51019 | 2006-07-24 16:30:00 -0700 | [diff] [blame] | 67 | goto Elong_unlock; |
David Howells | f7b422b | 2006-06-09 09:34:33 -0400 | [diff] [blame] | 68 | end -= namelen; |
| 69 | memcpy(end, dentry->d_name.name, namelen); |
| 70 | *--end = '/'; |
Al Viro | b514f87 | 2011-03-16 06:26:11 -0400 | [diff] [blame] | 71 | spin_unlock(&dentry->d_lock); |
David Howells | f7b422b | 2006-06-09 09:34:33 -0400 | [diff] [blame] | 72 | dentry = dentry->d_parent; |
| 73 | } |
Al Viro | b514f87 | 2011-03-16 06:26:11 -0400 | [diff] [blame] | 74 | if (read_seqretry(&rename_lock, seq)) { |
| 75 | spin_unlock(&dentry->d_lock); |
| 76 | rcu_read_unlock(); |
Nick Piggin | 949854d | 2011-01-07 17:49:37 +1100 | [diff] [blame] | 77 | goto rename_retry; |
Al Viro | b514f87 | 2011-03-16 06:26:11 -0400 | [diff] [blame] | 78 | } |
Trond Myklebust | 0b75b35 | 2009-06-22 15:09:14 -0400 | [diff] [blame] | 79 | if (*end != '/') { |
Al Viro | b514f87 | 2011-03-16 06:26:11 -0400 | [diff] [blame] | 80 | if (--buflen < 0) { |
| 81 | spin_unlock(&dentry->d_lock); |
| 82 | rcu_read_unlock(); |
Trond Myklebust | 0b75b35 | 2009-06-22 15:09:14 -0400 | [diff] [blame] | 83 | goto Elong; |
Al Viro | b514f87 | 2011-03-16 06:26:11 -0400 | [diff] [blame] | 84 | } |
Trond Myklebust | 0b75b35 | 2009-06-22 15:09:14 -0400 | [diff] [blame] | 85 | *--end = '/'; |
| 86 | } |
Al Viro | b514f87 | 2011-03-16 06:26:11 -0400 | [diff] [blame] | 87 | *p = end; |
| 88 | base = dentry->d_fsdata; |
| 89 | if (!base) { |
| 90 | spin_unlock(&dentry->d_lock); |
| 91 | rcu_read_unlock(); |
| 92 | WARN_ON(1); |
| 93 | return end; |
| 94 | } |
David Howells | f7b422b | 2006-06-09 09:34:33 -0400 | [diff] [blame] | 95 | namelen = strlen(base); |
| 96 | /* Strip off excess slashes in base string */ |
| 97 | while (namelen > 0 && base[namelen - 1] == '/') |
| 98 | namelen--; |
| 99 | buflen -= namelen; |
Al Viro | b514f87 | 2011-03-16 06:26:11 -0400 | [diff] [blame] | 100 | if (buflen < 0) { |
Dan Carpenter | 1c34092 | 2011-03-20 14:22:07 +0300 | [diff] [blame^] | 101 | spin_unlock(&dentry->d_lock); |
Al Viro | b514f87 | 2011-03-16 06:26:11 -0400 | [diff] [blame] | 102 | rcu_read_unlock(); |
David Howells | f7b422b | 2006-06-09 09:34:33 -0400 | [diff] [blame] | 103 | goto Elong; |
Al Viro | b514f87 | 2011-03-16 06:26:11 -0400 | [diff] [blame] | 104 | } |
David Howells | f7b422b | 2006-06-09 09:34:33 -0400 | [diff] [blame] | 105 | end -= namelen; |
| 106 | memcpy(end, base, namelen); |
Al Viro | b514f87 | 2011-03-16 06:26:11 -0400 | [diff] [blame] | 107 | spin_unlock(&dentry->d_lock); |
| 108 | rcu_read_unlock(); |
David Howells | f7b422b | 2006-06-09 09:34:33 -0400 | [diff] [blame] | 109 | return end; |
Josh Triplett | ce51019 | 2006-07-24 16:30:00 -0700 | [diff] [blame] | 110 | Elong_unlock: |
Dan Carpenter | 1c34092 | 2011-03-20 14:22:07 +0300 | [diff] [blame^] | 111 | spin_unlock(&dentry->d_lock); |
Nick Piggin | 949854d | 2011-01-07 17:49:37 +1100 | [diff] [blame] | 112 | rcu_read_unlock(); |
| 113 | if (read_seqretry(&rename_lock, seq)) |
| 114 | goto rename_retry; |
David Howells | f7b422b | 2006-06-09 09:34:33 -0400 | [diff] [blame] | 115 | Elong: |
| 116 | return ERR_PTR(-ENAMETOOLONG); |
| 117 | } |
| 118 | |
| 119 | /* |
David Howells | 36d43a4 | 2011-01-14 18:45:42 +0000 | [diff] [blame] | 120 | * nfs_d_automount - Handle crossing a mountpoint on the server |
| 121 | * @path - The mountpoint |
Trond Myklebust | 55a9759 | 2006-06-09 09:34:19 -0400 | [diff] [blame] | 122 | * |
| 123 | * When we encounter a mountpoint on the server, we want to set up |
| 124 | * a mountpoint on the client too, to prevent inode numbers from |
| 125 | * colliding, and to allow "df" to work properly. |
| 126 | * On NFSv4, we also want to allow for the fact that different |
| 127 | * filesystems may be migrated to different servers in a failover |
| 128 | * situation, and that different filesystems may want to use |
| 129 | * different security flavours. |
| 130 | */ |
David Howells | 36d43a4 | 2011-01-14 18:45:42 +0000 | [diff] [blame] | 131 | struct vfsmount *nfs_d_automount(struct path *path) |
Trond Myklebust | 55a9759 | 2006-06-09 09:34:19 -0400 | [diff] [blame] | 132 | { |
| 133 | struct vfsmount *mnt; |
David Howells | 36d43a4 | 2011-01-14 18:45:42 +0000 | [diff] [blame] | 134 | struct nfs_server *server = NFS_SERVER(path->dentry->d_inode); |
Trond Myklebust | 55a9759 | 2006-06-09 09:34:19 -0400 | [diff] [blame] | 135 | struct dentry *parent; |
Trond Myklebust | a4d7f16 | 2010-04-16 16:22:46 -0400 | [diff] [blame] | 136 | struct nfs_fh *fh = NULL; |
| 137 | struct nfs_fattr *fattr = NULL; |
Trond Myklebust | 55a9759 | 2006-06-09 09:34:19 -0400 | [diff] [blame] | 138 | int err; |
| 139 | |
David Howells | 36d43a4 | 2011-01-14 18:45:42 +0000 | [diff] [blame] | 140 | dprintk("--> nfs_d_automount()\n"); |
David Howells | 54ceac4 | 2006-08-22 20:06:13 -0400 | [diff] [blame] | 141 | |
David Howells | 36d43a4 | 2011-01-14 18:45:42 +0000 | [diff] [blame] | 142 | mnt = ERR_PTR(-ESTALE); |
| 143 | if (IS_ROOT(path->dentry)) |
| 144 | goto out_nofree; |
Denis V. Lunev | 44d5759 | 2008-08-11 12:02:34 +0400 | [diff] [blame] | 145 | |
David Howells | 36d43a4 | 2011-01-14 18:45:42 +0000 | [diff] [blame] | 146 | mnt = ERR_PTR(-ENOMEM); |
Trond Myklebust | a4d7f16 | 2010-04-16 16:22:46 -0400 | [diff] [blame] | 147 | fh = nfs_alloc_fhandle(); |
| 148 | fattr = nfs_alloc_fattr(); |
| 149 | if (fh == NULL || fattr == NULL) |
David Howells | 36d43a4 | 2011-01-14 18:45:42 +0000 | [diff] [blame] | 150 | goto out; |
Trond Myklebust | a4d7f16 | 2010-04-16 16:22:46 -0400 | [diff] [blame] | 151 | |
Harvey Harrison | 3110ff8 | 2008-05-02 13:42:44 -0700 | [diff] [blame] | 152 | dprintk("%s: enter\n", __func__); |
David Howells | 54ceac4 | 2006-08-22 20:06:13 -0400 | [diff] [blame] | 153 | |
David Howells | 36d43a4 | 2011-01-14 18:45:42 +0000 | [diff] [blame] | 154 | /* Look it up again to get its attributes */ |
| 155 | parent = dget_parent(path->dentry); |
David Howells | 8fa5c00 | 2006-08-22 20:06:12 -0400 | [diff] [blame] | 156 | err = server->nfs_client->rpc_ops->lookup(parent->d_inode, |
David Howells | 36d43a4 | 2011-01-14 18:45:42 +0000 | [diff] [blame] | 157 | &path->dentry->d_name, |
Trond Myklebust | a4d7f16 | 2010-04-16 16:22:46 -0400 | [diff] [blame] | 158 | fh, fattr); |
Trond Myklebust | 55a9759 | 2006-06-09 09:34:19 -0400 | [diff] [blame] | 159 | dput(parent); |
David Howells | 36d43a4 | 2011-01-14 18:45:42 +0000 | [diff] [blame] | 160 | if (err != 0) { |
| 161 | mnt = ERR_PTR(err); |
| 162 | goto out; |
| 163 | } |
Trond Myklebust | 55a9759 | 2006-06-09 09:34:19 -0400 | [diff] [blame] | 164 | |
Trond Myklebust | a4d7f16 | 2010-04-16 16:22:46 -0400 | [diff] [blame] | 165 | if (fattr->valid & NFS_ATTR_FATTR_V4_REFERRAL) |
Al Viro | f8ad9c4 | 2011-03-16 06:32:07 -0400 | [diff] [blame] | 166 | mnt = nfs_do_refmount(path->dentry); |
Manoj Naik | 6b97fd3 | 2006-06-09 09:34:29 -0400 | [diff] [blame] | 167 | else |
Al Viro | f8ad9c4 | 2011-03-16 06:32:07 -0400 | [diff] [blame] | 168 | mnt = nfs_do_submount(path->dentry, fh, fattr); |
Trond Myklebust | 55a9759 | 2006-06-09 09:34:19 -0400 | [diff] [blame] | 169 | if (IS_ERR(mnt)) |
David Howells | 36d43a4 | 2011-01-14 18:45:42 +0000 | [diff] [blame] | 170 | goto out; |
Trond Myklebust | 55a9759 | 2006-06-09 09:34:19 -0400 | [diff] [blame] | 171 | |
David Howells | ea5b778 | 2011-01-14 19:10:03 +0000 | [diff] [blame] | 172 | dprintk("%s: done, success\n", __func__); |
| 173 | mntget(mnt); /* prevent immediate expiration */ |
| 174 | mnt_set_expiry(mnt, &nfs_automount_list); |
| 175 | schedule_delayed_work(&nfs_automount_task, nfs_mountpoint_expiry_timeout); |
David Howells | 36d43a4 | 2011-01-14 18:45:42 +0000 | [diff] [blame] | 176 | |
Trond Myklebust | 55a9759 | 2006-06-09 09:34:19 -0400 | [diff] [blame] | 177 | out: |
Trond Myklebust | a4d7f16 | 2010-04-16 16:22:46 -0400 | [diff] [blame] | 178 | nfs_free_fattr(fattr); |
| 179 | nfs_free_fhandle(fh); |
David Howells | 36d43a4 | 2011-01-14 18:45:42 +0000 | [diff] [blame] | 180 | out_nofree: |
| 181 | dprintk("<-- nfs_follow_mountpoint() = %p\n", mnt); |
| 182 | return mnt; |
Trond Myklebust | 55a9759 | 2006-06-09 09:34:19 -0400 | [diff] [blame] | 183 | } |
| 184 | |
Arjan van de Ven | 92e1d5b | 2007-02-12 00:55:39 -0800 | [diff] [blame] | 185 | const struct inode_operations nfs_mountpoint_inode_operations = { |
Trond Myklebust | 55a9759 | 2006-06-09 09:34:19 -0400 | [diff] [blame] | 186 | .getattr = nfs_getattr, |
| 187 | }; |
Trond Myklebust | 51d8fa6 | 2006-06-09 09:34:20 -0400 | [diff] [blame] | 188 | |
Arjan van de Ven | 92e1d5b | 2007-02-12 00:55:39 -0800 | [diff] [blame] | 189 | const struct inode_operations nfs_referral_inode_operations = { |
Manoj Naik | 6b97fd3 | 2006-06-09 09:34:29 -0400 | [diff] [blame] | 190 | }; |
| 191 | |
David Howells | 65f27f3 | 2006-11-22 14:55:48 +0000 | [diff] [blame] | 192 | static void nfs_expire_automounts(struct work_struct *work) |
Trond Myklebust | 51d8fa6 | 2006-06-09 09:34:20 -0400 | [diff] [blame] | 193 | { |
David Howells | 65f27f3 | 2006-11-22 14:55:48 +0000 | [diff] [blame] | 194 | struct list_head *list = &nfs_automount_list; |
Trond Myklebust | 51d8fa6 | 2006-06-09 09:34:20 -0400 | [diff] [blame] | 195 | |
| 196 | mark_mounts_for_expiry(list); |
| 197 | if (!list_empty(list)) |
| 198 | schedule_delayed_work(&nfs_automount_task, nfs_mountpoint_expiry_timeout); |
| 199 | } |
| 200 | |
| 201 | void nfs_release_automount_timer(void) |
| 202 | { |
Trond Myklebust | 3d39c69 | 2007-08-07 15:28:33 -0400 | [diff] [blame] | 203 | if (list_empty(&nfs_automount_list)) |
Trond Myklebust | 560aef7 | 2007-08-27 09:14:56 -0400 | [diff] [blame] | 204 | cancel_delayed_work(&nfs_automount_task); |
Trond Myklebust | 51d8fa6 | 2006-06-09 09:34:20 -0400 | [diff] [blame] | 205 | } |
David Howells | f7b422b | 2006-06-09 09:34:33 -0400 | [diff] [blame] | 206 | |
| 207 | /* |
| 208 | * Clone a mountpoint of the appropriate type |
| 209 | */ |
David Howells | 509de81 | 2006-08-22 20:06:11 -0400 | [diff] [blame] | 210 | static struct vfsmount *nfs_do_clone_mount(struct nfs_server *server, |
| 211 | const char *devname, |
David Howells | f7b422b | 2006-06-09 09:34:33 -0400 | [diff] [blame] | 212 | struct nfs_clone_mount *mountdata) |
| 213 | { |
| 214 | #ifdef CONFIG_NFS_V4 |
Denis V. Lunev | fd08d7e | 2008-07-31 09:38:55 +0400 | [diff] [blame] | 215 | struct vfsmount *mnt = ERR_PTR(-EINVAL); |
Trond Myklebust | 40c55319 | 2007-12-14 14:56:07 -0500 | [diff] [blame] | 216 | switch (server->nfs_client->rpc_ops->version) { |
David Howells | f7b422b | 2006-06-09 09:34:33 -0400 | [diff] [blame] | 217 | case 2: |
| 218 | case 3: |
David Howells | 54ceac4 | 2006-08-22 20:06:13 -0400 | [diff] [blame] | 219 | mnt = vfs_kern_mount(&nfs_xdev_fs_type, 0, devname, mountdata); |
David Howells | f7b422b | 2006-06-09 09:34:33 -0400 | [diff] [blame] | 220 | break; |
| 221 | case 4: |
David Howells | 54ceac4 | 2006-08-22 20:06:13 -0400 | [diff] [blame] | 222 | mnt = vfs_kern_mount(&nfs4_xdev_fs_type, 0, devname, mountdata); |
David Howells | f7b422b | 2006-06-09 09:34:33 -0400 | [diff] [blame] | 223 | } |
| 224 | return mnt; |
| 225 | #else |
David Howells | 54ceac4 | 2006-08-22 20:06:13 -0400 | [diff] [blame] | 226 | return vfs_kern_mount(&nfs_xdev_fs_type, 0, devname, mountdata); |
David Howells | f7b422b | 2006-06-09 09:34:33 -0400 | [diff] [blame] | 227 | #endif |
| 228 | } |
| 229 | |
| 230 | /** |
| 231 | * nfs_do_submount - set up mountpoint when crossing a filesystem boundary |
David Howells | f7b422b | 2006-06-09 09:34:33 -0400 | [diff] [blame] | 232 | * @dentry - parent directory |
| 233 | * @fh - filehandle for new root dentry |
| 234 | * @fattr - attributes for new root inode |
| 235 | * |
| 236 | */ |
Al Viro | f8ad9c4 | 2011-03-16 06:32:07 -0400 | [diff] [blame] | 237 | static struct vfsmount *nfs_do_submount(struct dentry *dentry, |
Adrian Bunk | 66f3750 | 2006-09-27 01:51:13 -0700 | [diff] [blame] | 238 | struct nfs_fh *fh, |
| 239 | struct nfs_fattr *fattr) |
David Howells | f7b422b | 2006-06-09 09:34:33 -0400 | [diff] [blame] | 240 | { |
| 241 | struct nfs_clone_mount mountdata = { |
Al Viro | f8ad9c4 | 2011-03-16 06:32:07 -0400 | [diff] [blame] | 242 | .sb = dentry->d_sb, |
David Howells | f7b422b | 2006-06-09 09:34:33 -0400 | [diff] [blame] | 243 | .dentry = dentry, |
| 244 | .fh = fh, |
| 245 | .fattr = fattr, |
| 246 | }; |
| 247 | struct vfsmount *mnt = ERR_PTR(-ENOMEM); |
| 248 | char *page = (char *) __get_free_page(GFP_USER); |
| 249 | char *devname; |
| 250 | |
David Howells | 54ceac4 | 2006-08-22 20:06:13 -0400 | [diff] [blame] | 251 | dprintk("--> nfs_do_submount()\n"); |
| 252 | |
Harvey Harrison | 3110ff8 | 2008-05-02 13:42:44 -0700 | [diff] [blame] | 253 | dprintk("%s: submounting on %s/%s\n", __func__, |
David Howells | f7b422b | 2006-06-09 09:34:33 -0400 | [diff] [blame] | 254 | dentry->d_parent->d_name.name, |
| 255 | dentry->d_name.name); |
| 256 | if (page == NULL) |
| 257 | goto out; |
Al Viro | b514f87 | 2011-03-16 06:26:11 -0400 | [diff] [blame] | 258 | devname = nfs_devname(dentry, page, PAGE_SIZE); |
David Howells | f7b422b | 2006-06-09 09:34:33 -0400 | [diff] [blame] | 259 | mnt = (struct vfsmount *)devname; |
| 260 | if (IS_ERR(devname)) |
| 261 | goto free_page; |
Al Viro | f8ad9c4 | 2011-03-16 06:32:07 -0400 | [diff] [blame] | 262 | mnt = nfs_do_clone_mount(NFS_SB(dentry->d_sb), devname, &mountdata); |
David Howells | f7b422b | 2006-06-09 09:34:33 -0400 | [diff] [blame] | 263 | free_page: |
| 264 | free_page((unsigned long)page); |
| 265 | out: |
Harvey Harrison | 3110ff8 | 2008-05-02 13:42:44 -0700 | [diff] [blame] | 266 | dprintk("%s: done\n", __func__); |
David Howells | 54ceac4 | 2006-08-22 20:06:13 -0400 | [diff] [blame] | 267 | |
| 268 | dprintk("<-- nfs_do_submount() = %p\n", mnt); |
David Howells | f7b422b | 2006-06-09 09:34:33 -0400 | [diff] [blame] | 269 | return mnt; |
| 270 | } |