diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2016-08-01 12:34:01 -0500 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2016-08-01 12:34:01 -0500 |
commit | 9454c23852ca6d7aec89fd6fd46a046c323caac3 (patch) | |
tree | 794be65345027b5adea3720a43124fee338333a5 /drivers/mtd/ubi/kapi.c | |
parent | a04bee8285a71cdbb9076c3dc38be1f0b9a6b4b3 (diff) | |
parent | 4ef33685aa0957d771e068b60a5f3ca6b47ade1c (diff) | |
download | linux-9454c23852ca6d7aec89fd6fd46a046c323caac3.tar.bz2 |
Merge branch 'pci/msi-affinity' into next
Conflicts:
drivers/nvme/host/pci.c
Diffstat (limited to 'drivers/mtd/ubi/kapi.c')
-rw-r--r-- | drivers/mtd/ubi/kapi.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/mtd/ubi/kapi.c b/drivers/mtd/ubi/kapi.c index 348dbbcbedc8..a9e2cef7c95c 100644 --- a/drivers/mtd/ubi/kapi.c +++ b/drivers/mtd/ubi/kapi.c @@ -302,6 +302,7 @@ EXPORT_SYMBOL_GPL(ubi_open_volume_nm); struct ubi_volume_desc *ubi_open_volume_path(const char *pathname, int mode) { int error, ubi_num, vol_id; + struct path path; struct kstat stat; dbg_gen("open volume %s, mode %d", pathname, mode); @@ -309,7 +310,12 @@ struct ubi_volume_desc *ubi_open_volume_path(const char *pathname, int mode) if (!pathname || !*pathname) return ERR_PTR(-EINVAL); - error = vfs_stat(pathname, &stat); + error = kern_path(pathname, LOOKUP_FOLLOW, &path); + if (error) + return ERR_PTR(error); + + error = vfs_getattr(&path, &stat); + path_put(&path); if (error) return ERR_PTR(error); |