[lxc/lxc] 432a17: simplify cleanup in storage_copy

0 views
Skip to first unread message

Stéphane Graber

unread,
May 20, 2026, 12:43:25 AMMay 20
to lxc-...@lists.linuxcontainers.org
Branch: refs/heads/main
Home: https://github.com/lxc/lxc
Commit: 432a17b5d439b894c6357ec36b22d8a7d45aa3fa
https://github.com/lxc/lxc/commit/432a17b5d439b894c6357ec36b22d8a7d45aa3fa
Author: Serge Hallyn <se...@hallyn.com>
Date: 2026-05-09 (Sat, 09 May 2026)

Changed paths:
M src/lxc/storage/storage.c

Log Message:
-----------
simplify cleanup in storage_copy

struct lxc_rootfs has an lxc_storage pointer, and vice versa.
put_lxc_rootfs(r) will free the storage it points to, but
freeing the storage won't free the lxc_rootfs.

By setting new_rootfs->storage and calling put_lxc_rootfs(new_rootfs),
which we weren't doing, we can avoid having to manually close the
dfd_idmapped.

Signed-off-by: Serge Hallyn <se...@hallyn.com>


Commit: cb8e0ec4b005b427e3c796ca7ef3362047dde352
https://github.com/lxc/lxc/commit/cb8e0ec4b005b427e3c796ca7ef3362047dde352
Author: Stéphane Graber <stgr...@stgraber.org>
Date: 2026-05-20 (Wed, 20 May 2026)

Changed paths:
M src/lxc/storage/storage.c

Log Message:
-----------
Merge pull request #4683 from hallyn/2026-05-09/storagecopy+cleanup

simplify cleanup in storage_copy


Compare: https://github.com/lxc/lxc/compare/db3ff9c45023...cb8e0ec4b005

To unsubscribe from these emails, change your notification settings at https://github.com/lxc/lxc/settings/notifications
Reply all
Reply to author
Forward
0 new messages