summaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2020-07-22 11:15:40 +0200
committerChristoph Hellwig <hch@lst.de>2020-07-31 08:17:54 +0200
commit716308a5331bf907b819f9db8dc942b19568f925 (patch)
tree9138128e16cab1d49d2006f8340425532c6f9e5d /drivers/md
parent5fee64fcde0770c41e926ff981022eaa512d8980 (diff)
downloadlinux-stable-716308a5331bf907b819f9db8dc942b19568f925.tar.gz
linux-stable-716308a5331bf907b819f9db8dc942b19568f925.tar.bz2
linux-stable-716308a5331bf907b819f9db8dc942b19568f925.zip
init: add an init_stat helper
Add a simple helper to stat with a kernel space file name and switch the early init code over to it. Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/md-autodetect.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/md/md-autodetect.c b/drivers/md/md-autodetect.c
index 14b6e86814c0..6bbec89976a7 100644
--- a/drivers/md/md-autodetect.c
+++ b/drivers/md/md-autodetect.c
@@ -5,6 +5,7 @@
#include <linux/mount.h>
#include <linux/major.h>
#include <linux/delay.h>
+#include <linux/init_syscalls.h>
#include <linux/raid/detect.h>
#include <linux/raid/md_u.h>
#include <linux/raid/md_p.h>
@@ -151,7 +152,7 @@ static void __init md_setup_drive(struct md_setup_args *args)
if (strncmp(devname, "/dev/", 5) == 0)
devname += 5;
snprintf(comp_name, 63, "/dev/%s", devname);
- if (vfs_stat(comp_name, &stat) == 0 && S_ISBLK(stat.mode))
+ if (init_stat(comp_name, &stat, 0) == 0 && S_ISBLK(stat.mode))
dev = new_decode_dev(stat.rdev);
if (!dev) {
pr_warn("md: Unknown device name: %s\n", devname);