]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: be more precise on errors when getting an inode from disk
authorFilipe Manana <fdmanana@suse.com>
Mon, 6 Jun 2016 10:51:25 +0000 (11:51 +0100)
committerFilipe Manana <fdmanana@suse.com>
Mon, 1 Aug 2016 06:32:03 +0000 (07:32 +0100)
commita777a4284da6ff21328ca7809c32a551e13d3ba9
tree251f0feaddfbbf6e98690943d470972d7b37c3d6
parent4ba1bc2db185c23c210bf49b80b135c8bb35afaf
Btrfs: be more precise on errors when getting an inode from disk

When we attempt to read an inode from disk, we end up always returning an
-ESTALE error to the caller regardless of the actual failure reason, which
can be an out of memory problem (when allocating a path), some error found
when reading from the fs/subvolume btree (like a genuine IO error) or the
inode does not exists. So lets start returning the real error code to the
callers so that they don't treat all -ESTALE errors as meaning that the
inode does not exists (such as during orphan cleanup). This will also be
needed for a subsequent patch in the same series dealing with a special
fsync case.

Signed-off-by: Filipe Manana <fdmanana@suse.com>
fs/btrfs/inode.c