[PATCH v2 3/8] xfs: dismiss xfs_uu_t

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



uuid_t (a.k.a struct uuid_v1) already provides the fields
needed by uuid_getnodeuniq(), so use them directly.

Signed-off-by: Amir Goldstein <amir73il@xxxxxxxxx>
---
 fs/xfs/uuid.c | 18 ++++--------------
 1 file changed, 4 insertions(+), 14 deletions(-)

diff --git a/fs/xfs/uuid.c b/fs/xfs/uuid.c
index b83f76b..7bb4fb8 100644
--- a/fs/xfs/uuid.c
+++ b/fs/xfs/uuid.c
@@ -17,15 +17,6 @@
  */
 #include <xfs.h>
 
-/* IRIX interpretation of an uuid_t */
-typedef struct {
-	__be32	uu_timelow;
-	__be16	uu_timemid;
-	__be16	uu_timehi;
-	__be16	uu_clockseq;
-	__be16	uu_node[3];
-} xfs_uu_t;
-
 /*
  * uuid_getnodeuniq - obtain the node unique fields of a UUID.
  *
@@ -35,11 +26,10 @@ typedef struct {
 void
 uuid_getnodeuniq(uuid_t *uuid, int fsid [2])
 {
-	xfs_uu_t *uup = (xfs_uu_t *)uuid;
-
-	fsid[0] = (be16_to_cpu(uup->uu_clockseq) << 16) |
-		   be16_to_cpu(uup->uu_timemid);
-	fsid[1] = be32_to_cpu(uup->uu_timelow);
+	fsid[0] = (uuid->clock_seq_hi_and_reserved << 24) |
+		  (uuid->clock_seq_low << 16) |
+		  be16_to_cpu(uuid->time_mid);
+	fsid[1] = be32_to_cpu(uuid->time_low);
 }
 
 int
-- 
2.7.4




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux