Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 38402
b: refs/heads/master
c: b009a87
h: refs/heads/master
v: v3
  • Loading branch information
J.Bruce Fields authored and Linus Torvalds committed Oct 4, 2006
1 parent f753c4a commit 3fe0c50
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 21c0d8fdd95024ffa708a938099148b8f1078d46
refs/heads/master: b009a873de05c6e0d7613df3584b6dcb2e4280ee
10 changes: 10 additions & 0 deletions trunk/fs/nfsd/export.c
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,7 @@ static void svc_export_put(struct kref *ref)
dput(exp->ex_dentry);
mntput(exp->ex_mnt);
auth_domain_put(exp->ex_client);
kfree(exp->ex_path);
kfree(exp);
}

Expand Down Expand Up @@ -398,6 +399,7 @@ static int svc_export_parse(struct cache_detail *cd, char *mesg, int mlen)
int an_int;

nd.dentry = NULL;
exp.ex_path = NULL;

if (mesg[mlen-1] != '\n')
return -EINVAL;
Expand Down Expand Up @@ -428,6 +430,10 @@ static int svc_export_parse(struct cache_detail *cd, char *mesg, int mlen)
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;
Expand Down Expand Up @@ -473,6 +479,7 @@ static int svc_export_parse(struct cache_detail *cd, char *mesg, int mlen)
else
exp_put(expp);
out:
kfree(exp.ex_path);
if (nd.dentry)
path_release(&nd);
out_no_path:
Expand Down Expand Up @@ -524,6 +531,7 @@ static void svc_export_init(struct cache_head *cnew, struct cache_head *citem)
new->ex_client = item->ex_client;
new->ex_dentry = dget(item->ex_dentry);
new->ex_mnt = mntget(item->ex_mnt);
new->ex_path = NULL;
}

static void export_update(struct cache_head *cnew, struct cache_head *citem)
Expand All @@ -535,6 +543,8 @@ 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_path = item->ex_path;
item->ex_path = NULL;
}

static struct cache_head *svc_export_alloc(void)
Expand Down
1 change: 1 addition & 0 deletions trunk/include/linux/nfsd/export.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ struct svc_export {
int ex_flags;
struct vfsmount * ex_mnt;
struct dentry * ex_dentry;
char * ex_path;
uid_t ex_anon_uid;
gid_t ex_anon_gid;
int ex_fsid;
Expand Down

0 comments on commit 3fe0c50

Please sign in to comment.