[Devel] [PATCH RH9 04/10] ext4: Kill ext4_uuid_valid()

Kirill Tkhai ktkhai at virtuozzo.com
Tue Jan 25 15:23:04 MSK 2022


Use generic function instead

Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
 fs/ext4/super.c |   13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index efafb86937e3..acb7994bac02 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -424,17 +424,6 @@ static time64_t __ext4_get_tstamp(__le32 *lo, __u8 *hi)
 #define ext4_get_tstamp(es, tstamp) \
 	__ext4_get_tstamp(&(es)->tstamp, &(es)->tstamp ## _hi)
 
-static int ext4_uuid_valid(const u8 *uuid)
-{
-	int i;
-
-	for (i = 0; i < 16; i++) {
-		if (uuid[i])
-			return 1;
-	}
-	return 0;
-}
-
 /**
  * ext4_send_uevent - prepare and send uevent
  *
@@ -463,7 +452,7 @@ static void ext4_send_uevent_work(struct work_struct *w)
 	if (ret)
 		goto out;
 
-	if (ext4_uuid_valid(uuid)) {
+	if (!uuid_is_null(uuid)) {
 		ret = add_uevent_var(env, "UUID=%pUB", uuid);
 		if (ret)
 			goto out;




More information about the Devel mailing list