Re: [PATCH v2] btrfs: returns -ENOMEM if path allocation failed in btrfs_cross_ref_exist()

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

 



On Wed, May 30, 2018 at 02:49:10PM +0800, Su Yue wrote:
> btrfs_alloc_path() may fail due to no enough memory,
> so let the function return -ENOMEM instead of -ENOENT is better.
> 
> Signed-off-by: Su Yue <suy.fnst@xxxxxxxxxxxxxx>

Reviewed-by: David Sterba <dsterba@xxxxxxxx>

Thanks. I've audited all return codes after failed path allocation, this
was the only one not matching.

The return code of btrfs_cross_ref_exist should be also distinguished at
the call sites, as both places expect only the ENOENT but should not
react to ENOMEM as if it were ENOENT.
--
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