Re: [PATCH v2 2/5] btrfs: remove set but not used variable err in btrfs_add_link

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

 



On Mon, Nov 19, 2018 at 10:38:14AM +0100, Johannes Thumshirn wrote:
> err holds the return value of either btrfs_del_root_ref() or
> btrfs_del_inode_ref() but it hasn't been checked since it's introduction with
> commit fe66a05a0679 (Btrfs: improve error handling for btrfs_insert_dir_item
> callers) in 2012.
> 
> As the error value hasn't been of any interest for 6 years we can just drop it
> as well.

No, I think there should actually be proper error hanling. This is on
the error handling path already so this might be tricky and could
require restructuring btrfs_add_link.

The error handling is not done everywhere it should and such
inconsistencies are more like a hint to improve that than to count the
years of negligence.  Code removal patches should come with a brief
analysis why the code can be safely dropped. You did that, which is
great, but the conclusion was wrong.



[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