projects/linux·commit ed8fd8d5

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

ed8fd8d5 · Linus Torvalds <[email protected]> · 2025-01-16 08:54:33 -08:00

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
Commit
ed8fd8d5dd4aa250e18152b80cbac24de7335488
Parents
619f0b6f · fe4de594

Merge commit. Changes below are compared with the first parent: 619f0b6f.

Changes

1 files changed · +4 −0

FileStatusAddDelContent
fs/btrfs/volumes.cmodified+4−0View file

fs/btrfs/volumes.c

View file
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 1cccaf9..3d0ac8b 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -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);