btrfs-progs: don't clobber errno in close_file_or_dir
authorDavid Sterba <dsterba@suse.com>
Thu, 25 Jan 2018 12:37:13 +0000 (13:37 +0100)
committerDavid Sterba <dsterba@suse.com>
Wed, 31 Jan 2018 14:14:03 +0000 (15:14 +0100)
commit24103f42ad7a65457a62ae5c0190ea0e428cb14b
tree88f632280323a6e82dfafa75d50302bdb48e3bfb
parentd7f906c23ae53a75884b759d13e02924fa0febda
btrfs-progs: don't clobber errno in close_file_or_dir

Preserve the errno value for the caller in case closing happens in the
middle of eg. an ioctl and reporing the failure. The errors that could
happen in close/closedir do not bother us.

Signed-off-by: David Sterba <dsterba@suse.com>
utils.c