Merge tag 'for-6.13-rc7-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux

Pull btrfs fix from David Sterba:

 - handle d_path() errors when canonicalizing device mapper paths during
   device scan

* tag 'for-6.13-rc7-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
  btrfs: add the missing error handling inside get_canonical_dev_path
This commit is contained in:
Linus Torvalds
2025-01-16 08:54:33 -08:00

View File

@@ -797,6 +797,10 @@ static int get_canonical_dev_path(const char *dev_path, char *canonical)
if (ret)
goto out;
resolved_path = d_path(&path, path_buf, PATH_MAX);
if (IS_ERR(resolved_path)) {
ret = PTR_ERR(resolved_path);
goto out;
}
ret = strscpy(canonical, resolved_path, PATH_MAX);
out:
kfree(path_buf);