Hi Jan, Arne,
I see this code in create_snapshot:

        if (inherit) {
                pending_snapshot->inherit = *inherit;
                *inherit = NULL;        /* take responsibility to free it */
        }

So, first thing I think it should be:
if (*inherit)
because in btrfs_ioctl_snap_create_v2() we have:
struct btrfs_qgroup_inherit *inherit = NULL;
...
btrfs_ioctl_snap_create_transid(..., &inherit)

so the current check is very unlikely to be NULL.

Second, I don't see anybody freeing pending_snapshot->inherit. I guess
it should be freed after callin btrfs_qgroup_inherit() and also in
btrfs_destroy_pending_snapshots().

Thanks,
Alex.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to