]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: avoid positive number with ERR_PTR
authorJan Schmidt <list.btrfs@jan-o-sch.net>
Wed, 8 Feb 2012 15:01:01 +0000 (16:01 +0100)
committerDavid Sterba <dsterba@suse.cz>
Wed, 15 Feb 2012 15:40:23 +0000 (16:40 +0100)
commit1c097157f8c8d8bc77f69bd3d8c4d8517e2f3e4b
tree22d5c69f57713ee25a4a3e38404d675c488a91cf
parentb0a120e8536b390b2fdfc1ac8016076d3d1b23d0
Btrfs: avoid positive number with ERR_PTR

inode_ref_info() returns 1 when the element wasn't found and < 0 on error,
just like btrfs_search_slot(). In iref_to_path() it's an error when the
inode ref can't be found, thus we return ERR_PTR(ret) in that case. In order
to avoid ERR_PTR(1), we now set ret to -ENOENT in that case.

Signed-off-by: Jan Schmidt <list.btrfs@jan-o-sch.net>
fs/btrfs/backref.c