aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Stava <martin.stava@gmail.com>2008-02-05 10:27:09 -0500
committerEric Van Hensbergen <ericvh@opteron.homeip.net>2008-02-06 20:20:44 -0500
commitafcf0c13aeac04a39fa4d1eafdb75604b81af860 (patch)
tree9f3cab296191512f6bd3d88ca2a553fdaadd55f8
parent3e6bdf473f489664dac4d7511d26c7ac3dfdc748 (diff)
9p: fix bug in p9_clone_stat
This patch fixes a bug in the copying of 9P stat information where string references weren't being updated properly. Signed-off-by: Martin Sava <martin.stava@gmail.com> Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
-rw-r--r--net/9p/client.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/9p/client.c b/net/9p/client.c
index af9199364049..069d9aa14205 100644
--- a/net/9p/client.c
+++ b/net/9p/client.c
@@ -901,16 +901,21 @@ static struct p9_stat *p9_clone_stat(struct p9_stat *st, int dotu)
901 memmove(ret, st, sizeof(struct p9_stat)); 901 memmove(ret, st, sizeof(struct p9_stat));
902 p = ((char *) ret) + sizeof(struct p9_stat); 902 p = ((char *) ret) + sizeof(struct p9_stat);
903 memmove(p, st->name.str, st->name.len); 903 memmove(p, st->name.str, st->name.len);
904 ret->name.str = p;
904 p += st->name.len; 905 p += st->name.len;
905 memmove(p, st->uid.str, st->uid.len); 906 memmove(p, st->uid.str, st->uid.len);
907 ret->uid.str = p;
906 p += st->uid.len; 908 p += st->uid.len;
907 memmove(p, st->gid.str, st->gid.len); 909 memmove(p, st->gid.str, st->gid.len);
910 ret->gid.str = p;
908 p += st->gid.len; 911 p += st->gid.len;
909 memmove(p, st->muid.str, st->muid.len); 912 memmove(p, st->muid.str, st->muid.len);
913 ret->muid.str = p;
910 p += st->muid.len; 914 p += st->muid.len;
911 915
912 if (dotu) { 916 if (dotu) {
913 memmove(p, st->extension.str, st->extension.len); 917 memmove(p, st->extension.str, st->extension.len);
918 ret->extension.str = p;
914 p += st->extension.len; 919 p += st->extension.len;
915 } 920 }
916 921