diff options
author | Nathan Scott <nathans@sgi.com> | 2006-03-14 13:24:46 +1100 |
---|---|---|
committer | Nathan Scott <nathans@sgi.com> | 2006-03-14 13:24:46 +1100 |
commit | a780143ea53d26362b7cfb6666c8d04fb989bb7a (patch) | |
tree | 7c42fcbc93036dfbff3cc172bec5d152ab1deedc | |
parent | e8234a6871aa0de1ed0aeeecb5230ecf3ab414e2 (diff) | |
download | op-kernel-dev-a780143ea53d26362b7cfb6666c8d04fb989bb7a.zip op-kernel-dev-a780143ea53d26362b7cfb6666c8d04fb989bb7a.tar.gz |
[XFS] UUID endianess fix. uu_timelow is a 32bit field and needs to be
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>
-rw-r--r-- | fs/xfs/support/uuid.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/fs/xfs/support/uuid.c b/fs/xfs/support/uuid.c index a3d565a..e157015 100644 --- a/fs/xfs/support/uuid.c +++ b/fs/xfs/support/uuid.c @@ -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; @@ -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 @@ -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); +} |