btrfs-progs: remove unnecessary judgment for fd in scrub
The scrub_read_file function is always on a branch, which has (fd >= 0), so there is not need to judgment the pasted in arg. Signed-off-by: Gui Hecheng <guihc.fnst@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.cz>
This commit is contained in:
parent
965cd86449
commit
dfe83649cf
|
@ -474,9 +474,6 @@ static struct scrub_file_record **scrub_read_file(int fd, int report_errors)
|
|||
char empty_uuid[BTRFS_FSID_SIZE] = {0};
|
||||
struct scrub_file_record **p = NULL;
|
||||
|
||||
if (fd < 0)
|
||||
return ERR_PTR(-EINVAL);
|
||||
|
||||
again:
|
||||
old_avail = avail - i;
|
||||
BUG_ON(old_avail < 0);
|
||||
|
|
Loading…
Reference in New Issue