[PATCH 10/13] nfsd: store export path in export
Neil Brown
neilb at suse.de
Mon Sep 4 03:34:55 EDT 2006
On Friday September 1, bfields at fieldses.org wrote:
> From: J. Bruce Fields <bfields at fieldses.org>
>
> 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 at citi.umich.edu>
....
> @@ -428,6 +429,9 @@ static int svc_export_parse(struct cache
> exp.ex_client = dom;
> exp.ex_mnt = nd.mnt;
> exp.ex_dentry = nd.dentry;
> + exp.ex_path = kstrdup(buf, GFP_KERNEL);
> + if (!exp.ex_path)
> + goto out;
'err' is 0 at this point. Need to be set to -ENOMEM before the 'if'.
Fixed.
>
> /* expiry */
> err = -EINVAL;
> @@ -473,6 +477,7 @@ static int svc_export_parse(struct cache
> else
> exp_put(expp);
> out:
> + kfree(exp.ex_path);
exp.ex_path might be uninitialised at this point.
Fixed.
NeilBrown
More information about the NFSv4
mailing list