aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/ubi/kapi.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-06-20 11:25:44 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-06-20 11:25:44 -0400
commitaf52739b922f656eb1f39016fabaabe4baeda2e2 (patch)
tree79a7aa810d0493cd0cf4adebac26d37f12e8b545 /drivers/mtd/ubi/kapi.c
parent25ed6a5e97809129a1bc852b6b5c7d03baa112c4 (diff)
parent33688abb2802ff3a230bd2441f765477b94cc89e (diff)
Merge 4.7-rc4 into staging-next
We want the fixes in here, and we can resolve a merge issue in drivers/iio/industrialio-trigger.c Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/mtd/ubi/kapi.c')
-rw-r--r--drivers/mtd/ubi/kapi.c8
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);
302struct ubi_volume_desc *ubi_open_volume_path(const char *pathname, int mode) 302struct ubi_volume_desc *ubi_open_volume_path(const char *pathname, int mode)
303{ 303{
304 int error, ubi_num, vol_id; 304 int error, ubi_num, vol_id;
305 struct path path;
305 struct kstat stat; 306 struct kstat stat;
306 307
307 dbg_gen("open volume %s, mode %d", pathname, mode); 308 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)
309 if (!pathname || !*pathname) 310 if (!pathname || !*pathname)
310 return ERR_PTR(-EINVAL); 311 return ERR_PTR(-EINVAL);
311 312
312 error = vfs_stat(pathname, &stat); 313 error = kern_path(pathname, LOOKUP_FOLLOW, &path);
314 if (error)
315 return ERR_PTR(error);
316
317 error = vfs_getattr(&path, &stat);
318 path_put(&path);
313 if (error) 319 if (error)
314 return ERR_PTR(error); 320 return ERR_PTR(error);
315 321