]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libmount: copy uniq_id in mnt_copy_fs()
authorKarel Zak <kzak@redhat.com>
Thu, 25 Jun 2026 10:17:02 +0000 (12:17 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 29 Jun 2026 09:05:33 +0000 (11:05 +0200)
The mnt_copy_fs() function copies all filesystem entry fields but
missed uniq_id, causing the unique mount ID to be lost when fs entries
are duplicated (e.g., for utab updates).

Signed-off-by: Karel Zak <kzak@redhat.com>
libmount/src/fs.c

index 3b7252486f698113f4992b1eb2db89c762fa5fda..a0d18a4f986cf9ba9d59dd552b7701e8a1144e43 100644 (file)
@@ -276,6 +276,7 @@ struct libmnt_fs *mnt_copy_fs(struct libmnt_fs *dest,
        dest->parent     = src->parent;
        dest->devno      = src->devno;
        dest->tid        = src->tid;
+       dest->uniq_id    = src->uniq_id;
 
        if (cpy_str_at_offset(dest, src, offsetof(struct libmnt_fs, source)))
                goto err;