From: Richard Schütz Date: Fri, 21 Nov 2014 20:44:48 +0000 (+0100) Subject: nspawn: ignore EEXIST when mounting tmpfs X-Git-Tag: v218~391 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=6c2d07020f752547a8a45b6f03546a61a5e1672d;hp=6e3157c5e64408c01817ffef05a77c8456bef958;p=elogind.git nspawn: ignore EEXIST when mounting tmpfs commit 79d80fc1466512d0ca211f4bfcd9de5f2f816a5a introduced a regression that prevents mounting a tmpfs if the mount point already exits in the container's root file system. This commit fixes the problem by ignoring EEXIST. --- diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c index b4dcf39e8..10a520c2d 100644 --- a/src/nspawn/nspawn.c +++ b/src/nspawn/nspawn.c @@ -828,7 +828,7 @@ static int mount_tmpfs(const char *dest) { return log_oom(); r = mkdir_label(where, 0755); - if (r < 0) { + if (r < 0 && errno != EEXIST) { log_error("creating mount point for tmpfs %s failed: %s", where, strerror(-r)); return r;