From: Christian Brauner Date: Wed, 28 Apr 2021 09:27:58 +0000 (+0200) Subject: storage/dir: remove error handling down X-Git-Tag: lxc-5.0.0~188^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a2460686209329f41181da93104a764c8ffb9734;p=thirdparty%2Flxc.git storage/dir: remove error handling down Signed-off-by: Christian Brauner --- diff --git a/src/lxc/storage/dir.c b/src/lxc/storage/dir.c index 223aecaab..cc7b7329d 100644 --- a/src/lxc/storage/dir.c +++ b/src/lxc/storage/dir.c @@ -170,8 +170,6 @@ int dir_mount(struct lxc_storage *bdev) "", PROTECT_OPATH_DIRECTORY, PROTECT_LOOKUP_BENEATH, 0, true); } - if (ret < 0) - return syserror("Failed to mount \"%s\" onto \"%s\"", source, target); } else { ret = mount(source, target, "bind", MS_BIND | MS_REC | mnt_opts->mnt_flags | mnt_opts->prop_flags, mnt_opts->data); if (ret < 0) @@ -192,6 +190,8 @@ int dir_mount(struct lxc_storage *bdev) TRACE("Mounted \"%s\" on \"%s\" with options \"%s\", mount flags \"%lu\", and propagation flags \"%lu\"", source, target, mnt_opts->data, mflags, mnt_opts->mnt_flags); } + if (ret < 0) + return syserror_set(ret, "Failed to mount \"%s\" onto \"%s\"", source, target); TRACE("Mounted \"%s\" onto \"%s\"", source, target); return 0;