[Devel] [PATCH RHEL9 COMMIT] ext4: Kill ext4_uuid_valid()

Konstantin Khorenko khorenko at virtuozzo.com
Thu Jan 27 17:36:52 MSK 2022


The commit is pushed to "branch-rh9-5.14.0-4.vz9.12.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh9-5.14.0-4.vz9.12.2
------>
commit eb05b4637a788bcc886c60c9c18a8063a442a8bb
Author: Kirill Tkhai <ktkhai at virtuozzo.com>
Date:   Thu Jan 27 17:36:52 2022 +0300

    ext4: Kill ext4_uuid_valid()
    
    Use generic function instead
    
    To_merge: ac6082c837be ("ext4: add generic uevent infrastructure")
    Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
    
    ====================
    xfs: Add notification about fs events like for ext4
    
    This patchset generalizes ext4's related code and introduced the same
    uevent notifications for xfs.
    
    https://jira.sw.ru/browse/PSBM-135476
    Feature: fs: udev events support
---
 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