]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: send, add missing error check for calls to path_loop()
authorFilipe Manana <fdmanana@suse.com>
Fri, 17 Jun 2016 16:13:36 +0000 (17:13 +0100)
committerFilipe Manana <fdmanana@suse.com>
Mon, 1 Aug 2016 06:23:20 +0000 (07:23 +0100)
commit916fac544c2fcb8b66dd89273c804994a22c962d
treed1d5180d948bf266587333c85e3581b21a7b7cbd
parent885d27186743d56f23d28294f4a832b771ddf5ae
Btrfs: send, add missing error check for calls to path_loop()

The function path_loop() can return a negative integer, signaling an
error, 0 if there's no path loop and 1 if there's a path loop. We were
treating any non zero values as meaning that a path loop exists. Fix
this by explicitly checking for errors and gracefully return them to
user space.

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