Re: [PATCH] Btrfs: BUG_ON is deleted from the caller of btrfs_truncate_item & btrfs_extend_item

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

 



Hi,

On Thu, May 19, 2011 at 02:19:08PM +0900, Tsutomu Itoh wrote:
> Currently, btrfs_truncate_item and btrfs_extend_item returns only 0.
> So, the check by BUG_ON in the caller is unnecessary.

well, I don't think it's right to remove the BUG_ONs right now.
btrfs_extend_item has it's own BUG_ON()s, which will hopefully get
turned to sane error handling someday. Currently the bugons are not
executed and do no harm. When btrfs_extend_item does return nonzero
values, that's IMO the right time to remove BUG_ONs in callers and do
error recovery.

I do not like to see that many BUG_ONs, but it's better than unchecked
return values when the function name suggests that things may not go
smooth and error-less.


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