]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/libfs.c
switch open-coded instances of d_make_root() to new helper
[karo-tx-linux.git] / fs / libfs.c
index 5b2dbb3ba4fca95f3aab72c39f570c16a61c5c02..7c895a763a1e6340e23488e49ea57811cd898d12 100644 (file)
@@ -491,11 +491,9 @@ int simple_fill_super(struct super_block *s, unsigned long magic,
        inode->i_op = &simple_dir_inode_operations;
        inode->i_fop = &simple_dir_operations;
        set_nlink(inode, 2);
-       root = d_alloc_root(inode);
-       if (!root) {
-               iput(inode);
+       root = d_make_root(inode);
+       if (!root)
                return -ENOMEM;
-       }
        for (i = 0; !files->name || files->name[0]; i++, files++) {
                if (!files->name)
                        continue;