Re: [PATCH 2/2] btrfs-progs: mark static & remove unused from non-kernel code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 07, 2013 at 10:17:57AM -0500, Eric Sandeen wrote:
> And isn't it still a mistake?  I think it used to be that subvol_uuid_search_init()
> would allocate the memory which must be freed, but that's no longer the case,
> right?  So under what circumstances is it correct to call
> subvol_uuid_search_add() which frees those pointers?

Looks like the memory management is internal to the subvol_uuid*
functions, now _init does not allocate and I don't see why _add should
call free. All users of subvol_uuid_search() free the memory themselves
(in current code).

Seems that subvol_uuid_search_add was exported without any concern that
it could be part of the library interface.

We don't have library ABI versioning in place, so I suggest to keep the
function there for compatibility with current code (though I'm not aware
of any external users of the _add function), but drop th free() calls
and put a "don't use" comment.

david
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux