btrfs-progs: check: special case for last item
authorSu Yue <suy.fnst@cn.fujitsu.com>
Fri, 1 Sep 2017 02:56:16 +0000 (10:56 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 16 Oct 2017 18:33:00 +0000 (20:33 +0200)
commit63edc9144113a17ebcf4576cdc73348868d7740b
tree47c7dd548ba538ea405fdcabd769633381ae00da
parenta47604de3ee0ecbf79ce9d3fd271562177777ec8
btrfs-progs: check: special case for last item

Since repair functions will search path again, if the last item
was checked, the location where the path points is invalid.

Fix it by saving the last valid key if err contains LAST_ITEM,
and call btrfs_next_item() before return of check_inode_item().

Signed-off-by: Su Yue <suy.fnst@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
cmds-check.c