Re: [PATCH 4/6] btrfs-progs: check result of first_cache_extent

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

 



On Fri, Dec 19, 2014 at 10:56:41AM -0600, Eric Sandeen wrote:
> On 12/19/14 10:06 AM, David Sterba wrote:
> > If the tree's empty, we'll get NULL and dereference it.
> 
> Hm, but this is under an explicit check for not empty:
> 
>         while (!cache_tree_empty(roots_info_cache)) {
> 
> sooo?  Maybe it's just defensive?  Nothing really wrong
> with being defensive, I suppose, so:

Well, mostly to shut up the warning with a minimal change. It could be
rewritten to

	while ((entry = ...)) { ... }

as in other places.
--
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