[systemd-devel] [PATCH] drop_duplicates: copy full BindMount struct
Zbigniew Jędrzejewski-Szmek
zbyszek at in.waw.pl
Sun Jul 27 12:29:14 PDT 2014
On Sun, Jul 27, 2014 at 04:32:13PM +0200, Ansgar Burchardt wrote:
> At least
>
> t->ignore = f->ignore;
>
> is missing here. Just copy the full struct to be sure.
> ---
> src/core/namespace.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/src/core/namespace.c b/src/core/namespace.c
> index 5466b7b..fe95377 100644
> --- a/src/core/namespace.c
> +++ b/src/core/namespace.c
> @@ -124,8 +124,7 @@ static void drop_duplicates(BindMount *m, unsigned *n) {
> if (previous && path_equal(f->path, previous->path))
> continue;
>
> - t->path = f->path;
> - t->mode = f->mode;
> + *t = *f;
>
> previous = t;
Applied.
Zbyszek
More information about the systemd-devel
mailing list