Skip to contentSkip to conversation

autofs: fix compilation on hosts without CONFIG_COMPAT

PATCH New Alexander Graf 1 participant 1 message Mar 2, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 autofs: fix compilation on hosts without CONFIG_COMPAT

When compiling 3.3-rc5 on arm, I get the following compilation error:

fs/autofs4/inode.c: In function 'autofs4_fill_super':
fs/autofs4/inode.c:228:2: error: implicit declaration of function 'is_compat_task' [-Werror=implicit-function-declaration]

which was introduced by commit a32744d4a. On platforms that don't define CONFIG_COMPAT, using is_compat_task() is not necessarily defined. So let's just not use it there.

---

Sorry if this was already fixed elsewhere - I couldn't find a patch for it, but my LKML searching skills are slightly limited :)

fs/autofs4/dev-ioctl.c +4 -0
index 85f1fcd..bab4c5a 100644
@@ -385,7 +385,11 @@ static int autofs_dev_ioctl_setpipefd(struct file *fp,
 		sbi->pipefd = pipefd;
 		sbi->pipe = pipe;
 		sbi->catatonic = 0;
+#ifdef CONFIG_COMPAT
 		sbi->compat_daemon = is_compat_task();
+#else
+		sbi->compat_daemon = 0;
+#endif
 	}
 out:
 	mutex_unlock(&sbi->wq_mutex);
fs/autofs4/inode.c +4 -0
index 06858d9..1fc68e7 100644
@@ -225,7 +225,11 @@ int autofs4_fill_super(struct super_block *s, void *data, int silent)
 	set_autofs_type_indirect(&sbi->type);
 	sbi->min_proto = 0;
 	sbi->max_proto = 0;
+#ifdef CONFIG_COMPAT
 	sbi->compat_daemon = is_compat_task();
+#else
+	sbi->compat_daemon = 0;
+#endif
 	mutex_init(&sbi->wq_mutex);
 	mutex_init(&sbi->pipe_mutex);
 	spin_lock_init(&sbi->fs_lock);