[virtio-9p] Make rpath thread safe

Current rpath inline function is heavily used in all system calls.
This function has a static buffer making it a non-thread safe function.
This patch introduces new thread-safe routine and makes use of it.

Signed-off-by: Venkateswararao Jujjuri "<jvrao@linux.vnet.ibm.com>
This commit is contained in:
Venkateswararao Jujjuri (JV) 2011-06-01 12:35:14 +05:30
parent 873c321393
commit faa44e3d3e
7 changed files with 98 additions and 92 deletions

View file

@ -97,11 +97,4 @@ typedef struct FileOperations
void *opaque;
} FileOperations;
static inline const char *rpath(FsContext *ctx, const char *path)
{
/* FIXME: so wrong... */
static char buffer[4096];
snprintf(buffer, sizeof(buffer), "%s/%s", ctx->fs_root, path);
return buffer;
}
#endif