From: alex Date: Sat, 31 Jul 2004 14:31:03 +0000 (+0000) Subject: r=adilger X-Git-Tag: v1_7_100~2012 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=552e645926a9ebb82089bf3bca39777334db0842;p=fs%2Flustre-release.git r=adilger - possible name collision in mdt_obj_create() fixed --- diff --git a/lustre/mds/handler.c b/lustre/mds/handler.c index 5eec678..035b9fc 100644 --- a/lustre/mds/handler.c +++ b/lustre/mds/handler.c @@ -1349,7 +1349,6 @@ static int mdt_obj_create(struct ptlrpc_request *req) struct dentry *new = NULL; struct dentry_params dp; int mealen, flags = 0, rc, size = sizeof(*repbody), cleanup_phase = 0; - unsigned int tmpname; struct lvfs_ucred uc; struct mea *mea; void *handle = NULL; @@ -1413,8 +1412,7 @@ static int mdt_obj_create(struct ptlrpc_request *req) cleanup_phase = 1; /* transaction */ repeat: - tmpname = ll_insecure_random_int(); - rc = sprintf(fidname, "%u", tmpname); + rc = sprintf(fidname, "%u.%u", ll_insecure_random_int(), current->pid); new = lookup_one_len(fidname, mds->mds_objects_dir, rc); if (IS_ERR(new)) { CERROR("%s: can't lookup new inode (%s) for mkdir: %d\n",