Btrfs-progs: make sure we are opening a file or dir with open_file_or_dir()
authorWang Shilong <wangsl.fnst@cn.fujitsu.com>
Thu, 12 Dec 2013 07:46:18 +0000 (15:46 +0800)
committerChris Mason <clm@fb.com>
Fri, 31 Jan 2014 16:22:14 +0000 (08:22 -0800)
commit80d5bf799e730d63ba52243857de43fc4aca6c75
tree8d8a91cd3b189e557882636253f4bcce41358f20
parentd9d970451024709bdff71bf20b99843a132c195d
Btrfs-progs: make sure we are opening a file or dir with open_file_or_dir()

Previously, open_file_or_dir() will open block device successfully, however,
we should enhance such checks to make sure we are really opening a file or dir.

Signed-off-by: Wang Shilong <wangsl.fnst@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <clm@fb.com>
utils.c