Re: [PATCH] btrfs: no need to check return value of debugfs_create functions

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

 




On 4.01.19 г. 15:25 ч., Greg Kroah-Hartman wrote:
> When calling debugfs functions, there is no need to ever check the
> return value.  The function can work or not, but the code logic should
> never do something different based on this.
> 
> Cc: Chris Mason <clm@xxxxxx>
> Cc: Josef Bacik <josef@xxxxxxxxxxxxxx>
> Cc: David Sterba <dsterba@xxxxxxxx>
> Cc: linux-btrfs@xxxxxxxxxxxxxxx
> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
> ---
>  fs/btrfs/sysfs.c | 10 ++--------
>  1 file changed, 2 insertions(+), 8 deletions(-)
> 
> Meta-comment, why is there a btrfs debugfs directory at all?  All you
> have here is a single "test" file that doesn't do anything except expose
> a variable that never changes.  What is this directory and single file
> for?  Can I just delete the whole thing?
> 

git blame is your friend - 1bae30982bc8 ("btrfs: add simple debugfs
interface")


Apparently David had an idea to do something but it never materialized,
imo the debugfs bits could be removed from sysfs.c



[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