gator-driver: Fix inode reference count with d_make_root usage in 3.4
authorJon Medhurst <tixy@linaro.org>
Tue, 8 May 2012 07:44:36 +0000 (08:44 +0100)
committerJon Medhurst <tixy@linaro.org>
Tue, 8 May 2012 07:46:28 +0000 (08:46 +0100)
Signed-off-by: Jon Medhurst <tixy@linaro.org>
driver/gator_fs.c

index 816dc7d6bd38e08578964669c7a2b9121f290ddd..247884a568ca5c50e67413df308f63234ee174bf 100644 (file)
@@ -239,7 +239,9 @@ static int gatorfs_fill_super(struct super_block *sb, void *data, int silent)
        root_dentry = d_make_root(root_inode);
 #endif
        if (!root_dentry) {
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 4, 0)
                iput(root_inode);
+#endif
                return -ENOMEM;
        }