mirror of
https://github.com/kdave/btrfs-progs
synced 2025-03-31 07:36:43 +00:00
Revert "Btrfs-progs: fix mount point detection due to partial prefix match"
This reverts commit cb8abddb20
.
There are several reports in IRC that this patch breaks in some
send/receive environments. There are no exact steps to reproduce, only
approximate descroptions. Until a proper reproducer is known, the patch
is temporarily reverted due to the user-visible impact.
Issue: #162
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
2e84a13a10
commit
f9148e3841
3
utils.c
3
utils.c
@ -2078,8 +2078,7 @@ int find_mount_root(const char *path, char **mount_root)
|
||||
|
||||
while ((ent = getmntent(mnttab))) {
|
||||
len = strlen(ent->mnt_dir);
|
||||
if (strncmp(ent->mnt_dir, path, len) == 0 &&
|
||||
(path[len] == '/' || path[len] == '\0')) {
|
||||
if (strncmp(ent->mnt_dir, path, len) == 0) {
|
||||
/* match found and use the latest match */
|
||||
if (longest_matchlen <= len) {
|
||||
free(longest_match);
|
||||
|
Loading…
Reference in New Issue
Block a user