[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

--
To unsubscribe from this list: send the line "unsubscribe linux-unionfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Filesystems Devel]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux