treewide: kmalloc() -> kmalloc_array()
[linux-block.git] / fs / namei.c
index 6df1f61855d600a7072b2b770e993118cc5ac036..2490ddb8bc90ca5c7dfcf406d50d374977a71846 100644 (file)
@@ -537,12 +537,12 @@ static int __nd_alloc_stack(struct nameidata *nd)
        struct saved *p;
 
        if (nd->flags & LOOKUP_RCU) {
-               p= kmalloc(MAXSYMLINKS * sizeof(struct saved),
+               p= kmalloc_array(MAXSYMLINKS, sizeof(struct saved),
                                  GFP_ATOMIC);
                if (unlikely(!p))
                        return -ECHILD;
        } else {
-               p= kmalloc(MAXSYMLINKS * sizeof(struct saved),
+               p= kmalloc_array(MAXSYMLINKS, sizeof(struct saved),
                                  GFP_KERNEL);
                if (unlikely(!p))
                        return -ENOMEM;