summaryrefslogtreecommitdiffstats
path: root/fs/afs/cmservice.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2017-05-28 01:56:46 -0400
committerChristoph Hellwig <hch@lst.de>2017-06-05 10:56:34 -0400
commit41bb26f8db3ad33b083e57eb9fc5828796110e77 (patch)
tree6e3ad26d303f047fa4f7358144da4d30d16b6de3 /fs/afs/cmservice.c
parent3c2993b8c6143d8a5793746a54eba8f86f95240f (diff)
uuid,afs: move struct uuid_v1 back into afs
This essentially is a partial revert of commit ff548773 ("afs: Move UUID struct to linux/uuid.h") and moves struct uuid_v1 back into fs/afs as struct afs_uuid. It however keeps it as big endian structure so that we can use the normal uuid generation helpers when casting to/from struct afs_uuid. The V1 uuid intrepretation in struct form isn't really useful to the rest of the kernel, and not really compatible to it either, so move it back to AFS instead of polluting the global uuid.h. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'fs/afs/cmservice.c')
-rw-r--r--fs/afs/cmservice.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/fs/afs/cmservice.c b/fs/afs/cmservice.c
index 3062cceb5c2a..782d4d05a53b 100644
--- a/fs/afs/cmservice.c
+++ b/fs/afs/cmservice.c
@@ -350,7 +350,7 @@ static int afs_deliver_cb_init_call_back_state3(struct afs_call *call)
350{ 350{
351 struct sockaddr_rxrpc srx; 351 struct sockaddr_rxrpc srx;
352 struct afs_server *server; 352 struct afs_server *server;
353 struct uuid_v1 *r; 353 struct afs_uuid *r;
354 unsigned loop; 354 unsigned loop;
355 __be32 *b; 355 __be32 *b;
356 int ret; 356 int ret;
@@ -380,7 +380,7 @@ static int afs_deliver_cb_init_call_back_state3(struct afs_call *call)
380 } 380 }
381 381
382 _debug("unmarshall UUID"); 382 _debug("unmarshall UUID");
383 call->request = kmalloc(sizeof(struct uuid_v1), GFP_KERNEL); 383 call->request = kmalloc(sizeof(struct afs_uuid), GFP_KERNEL);
384 if (!call->request) 384 if (!call->request)
385 return -ENOMEM; 385 return -ENOMEM;
386 386
@@ -453,7 +453,7 @@ static int afs_deliver_cb_probe(struct afs_call *call)
453static void SRXAFSCB_ProbeUuid(struct work_struct *work) 453static void SRXAFSCB_ProbeUuid(struct work_struct *work)
454{ 454{
455 struct afs_call *call = container_of(work, struct afs_call, work); 455 struct afs_call *call = container_of(work, struct afs_call, work);
456 struct uuid_v1 *r = call->request; 456 struct afs_uuid *r = call->request;
457 457
458 struct { 458 struct {
459 __be32 match; 459 __be32 match;
@@ -476,7 +476,7 @@ static void SRXAFSCB_ProbeUuid(struct work_struct *work)
476 */ 476 */
477static int afs_deliver_cb_probe_uuid(struct afs_call *call) 477static int afs_deliver_cb_probe_uuid(struct afs_call *call)
478{ 478{
479 struct uuid_v1 *r; 479 struct afs_uuid *r;
480 unsigned loop; 480 unsigned loop;
481 __be32 *b; 481 __be32 *b;
482 int ret; 482 int ret;
@@ -502,15 +502,15 @@ static int afs_deliver_cb_probe_uuid(struct afs_call *call)
502 } 502 }
503 503
504 _debug("unmarshall UUID"); 504 _debug("unmarshall UUID");
505 call->request = kmalloc(sizeof(struct uuid_v1), GFP_KERNEL); 505 call->request = kmalloc(sizeof(struct afs_uuid), GFP_KERNEL);
506 if (!call->request) 506 if (!call->request)
507 return -ENOMEM; 507 return -ENOMEM;
508 508
509 b = call->buffer; 509 b = call->buffer;
510 r = call->request; 510 r = call->request;
511 r->time_low = b[0]; 511 r->time_low = ntohl(b[0]);
512 r->time_mid = htons(ntohl(b[1])); 512 r->time_mid = ntohl(b[1]);
513 r->time_hi_and_version = htons(ntohl(b[2])); 513 r->time_hi_and_version = ntohl(b[2]);
514 r->clock_seq_hi_and_reserved = ntohl(b[3]); 514 r->clock_seq_hi_and_reserved = ntohl(b[3]);
515 r->clock_seq_low = ntohl(b[4]); 515 r->clock_seq_low = ntohl(b[4]);
516 516