Store the export path in the svc_export structure instead of storing only the
dentry. This will prevent the need for additional d_path calls to provide
NFSv4 fs_locations support.
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
dput(exp->ex_dentry);
mntput(exp->ex_mnt);
auth_domain_put(exp->ex_client);
dput(exp->ex_dentry);
mntput(exp->ex_mnt);
auth_domain_put(exp->ex_client);
int an_int;
nd.dentry = NULL;
int an_int;
nd.dentry = NULL;
if (mesg[mlen-1] != '\n')
return -EINVAL;
if (mesg[mlen-1] != '\n')
return -EINVAL;
exp.ex_client = dom;
exp.ex_mnt = nd.mnt;
exp.ex_dentry = nd.dentry;
exp.ex_client = dom;
exp.ex_mnt = nd.mnt;
exp.ex_dentry = nd.dentry;
+ exp.ex_path = kstrdup(buf, GFP_KERNEL);
+ err = -ENOMEM;
+ if (!exp.ex_path)
+ goto out;
/* expiry */
err = -EINVAL;
/* expiry */
err = -EINVAL;
if (nd.dentry)
path_release(&nd);
out_no_path:
if (nd.dentry)
path_release(&nd);
out_no_path:
new->ex_client = item->ex_client;
new->ex_dentry = dget(item->ex_dentry);
new->ex_mnt = mntget(item->ex_mnt);
new->ex_client = item->ex_client;
new->ex_dentry = dget(item->ex_dentry);
new->ex_mnt = mntget(item->ex_mnt);
}
static void export_update(struct cache_head *cnew, struct cache_head *citem)
}
static void export_update(struct cache_head *cnew, struct cache_head *citem)
new->ex_anon_uid = item->ex_anon_uid;
new->ex_anon_gid = item->ex_anon_gid;
new->ex_fsid = item->ex_fsid;
new->ex_anon_uid = item->ex_anon_uid;
new->ex_anon_gid = item->ex_anon_gid;
new->ex_fsid = item->ex_fsid;
+ new->ex_path = item->ex_path;
+ item->ex_path = NULL;
}
static struct cache_head *svc_export_alloc(void)
}
static struct cache_head *svc_export_alloc(void)
int ex_flags;
struct vfsmount * ex_mnt;
struct dentry * ex_dentry;
int ex_flags;
struct vfsmount * ex_mnt;
struct dentry * ex_dentry;
uid_t ex_anon_uid;
gid_t ex_anon_gid;
int ex_fsid;
uid_t ex_anon_uid;
gid_t ex_anon_gid;
int ex_fsid;