Skip to content

Commit

Permalink
[XFS] UUID endianess fix. uu_timelow is a 32bit field and needs to be
Browse files Browse the repository at this point in the history
swapped with be32_to_cpu. 

SGI-PV: 943272
SGI-Modid: xfs-linux-melb:xfs-kern:25232a

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nathan Scott <nathans@sgi.com>
  • Loading branch information
Nathan Scott committed Mar 14, 2006
1 parent e8234a6 commit a780143
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions fs/xfs/support/uuid.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,6 @@ static mutex_t uuid_monitor;
static int uuid_table_size;
static uuid_t *uuid_table;

void
uuid_init(void)
{
mutex_init(&uuid_monitor);
}


/* IRIX interpretation of an uuid_t */
typedef struct {
__be32 uu_timelow;
Expand All @@ -50,7 +43,7 @@ uuid_getnodeuniq(uuid_t *uuid, int fsid [2])

fsid[0] = (be16_to_cpu(uup->uu_clockseq) << 16) |
be16_to_cpu(uup->uu_timemid);
fsid[1] = be16_to_cpu(uup->uu_timelow);
fsid[1] = be32_to_cpu(uup->uu_timelow);
}

void
Expand Down Expand Up @@ -139,3 +132,9 @@ uuid_table_remove(uuid_t *uuid)
ASSERT(i < uuid_table_size);
mutex_unlock(&uuid_monitor);
}

void
uuid_init(void)
{
mutex_init(&uuid_monitor);
}

0 comments on commit a780143

Please sign in to comment.