10 #include <linux/module.h>
15 #include <linux/nfs_fs.h>
16 #include <linux/string.h>
22 #define NFSDBG_FACILITY NFSDBG_VFS
66 spin_lock(&dentry->
d_lock);
69 namelen = dentry->
d_name.len;
70 buflen -= namelen + 1;
76 spin_unlock(&dentry->
d_lock);
80 spin_unlock(&dentry->
d_lock);
86 spin_unlock(&dentry->
d_lock);
95 spin_unlock(&dentry->
d_lock);
101 if (flags & NFS_PATH_CANONICAL) {
103 while (namelen > 0 && base[namelen - 1] ==
'/')
108 spin_unlock(&dentry->
d_lock);
113 memcpy(end, base, namelen);
114 spin_unlock(&dentry->
d_lock);
118 spin_unlock(&dentry->
d_lock);
146 dprintk(
"--> nfs_d_automount()\n");
158 dprintk(
"%s: enter\n", __func__);
160 mnt = server->
nfs_client->rpc_ops->submount(server, path->
dentry, fh, fattr);
164 dprintk(
"%s: done, success\n", __func__);
170 nfs_free_fattr(fattr);
171 nfs_free_fhandle(fh);
174 dprintk(
"<-- %s(): error %ld\n", __func__, PTR_ERR(mnt));
176 dprintk(
"<-- %s() = %p\n", __func__, mnt);
192 if (!list_empty(list))
198 if (list_empty(&nfs_automount_list))
221 struct nfs_fattr *fattr, rpc_authflavor_t authflavor)
234 dprintk(
"--> nfs_do_submount()\n");
236 dprintk(
"%s: submounting on %s/%s\n", __func__,
241 devname = nfs_devname(dentry, page,
PAGE_SIZE);
245 mnt = nfs_do_clone_mount(NFS_SB(dentry->
d_sb), devname, &mountdata);
249 dprintk(
"%s: done\n", __func__);
251 dprintk(
"<-- nfs_do_submount() = %p\n", mnt);