Skip to content

Commit

Permalink
Revert "dir: non-functional changes"
Browse files Browse the repository at this point in the history
This reverts commit 8f2896d.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
  • Loading branch information
Christian Brauner committed Aug 15, 2017
1 parent b70ffc2 commit 115dd89
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions src/lxc/bdev/lxcdir.c
Expand Up @@ -36,15 +36,14 @@ lxc_log_define(lxcdir, lxc);
* name and paths for the new
*/
int dir_clonepaths(struct bdev *orig, struct bdev *new, const char *oldname,
const char *cname, const char *oldpath, const char *lxcpath,
int snap, uint64_t newsize, struct lxc_conf *conf)
const char *cname, const char *oldpath, const char *lxcpath,
int snap, uint64_t newsize, struct lxc_conf *conf)
{
int ret;
size_t len;

if (snap) {
ERROR("directories cannot be snapshotted. Try aufs or "
"overlayfs.");
ERROR("directories cannot be snapshotted. Try aufs or overlayfs.");
return -1;
}

Expand Down Expand Up @@ -151,13 +150,11 @@ int dir_mount(struct bdev *bdev)

src = lxc_storage_get_path(bdev->src, bdev->type);

ret = mount(src, bdev->dest, "bind", MS_BIND | MS_REC | mntflags,
mntdata);
ret = mount(src, bdev->dest, "bind", MS_BIND | MS_REC | mntflags, mntdata);
if ((0 == ret) && (mntflags & MS_RDONLY)) {
DEBUG("remounting %s on %s with readonly options",
src ? src : "(none)", bdev->dest ? bdev->dest : "(none)");
mflags = add_required_remount_flags(
src, bdev->dest, MS_BIND | MS_REC | mntflags | MS_REMOUNT);
src ? src : "(none)", bdev->dest ? bdev->dest : "(none)");
mflags = add_required_remount_flags(src, bdev->dest, MS_BIND | MS_REC | mntflags | MS_REMOUNT);
ret = mount(src, bdev->dest, "bind", mflags, mntdata);
}

Expand Down

0 comments on commit 115dd89

Please sign in to comment.