summaryrefslogtreecommitdiff
path: root/drivers/md/md-autodetect.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/md-autodetect.c')
-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);