]> git.hungrycats.org Git - linux/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)
committerZygo Blaxell <zblaxell@waya.furryterror.org>
Wed, 17 Aug 2016 02:20:12 +0000 (22:20 -0400)
commitc558d561da6f8ba40ef2f89e8c6a33466ce31d13
treee978d4bcb06f2ed6f736ff7ceb78c959020f23f8
parent0d57bf1f525951af89b4e2089c95cbc7600c89ba
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>
(cherry picked from commit 67710892ec983aa79ad1e2a2642fe8e3a4a194ea)
fs/btrfs/inode.c