summaryrefslogtreecommitdiff
path: root/cmds-scrub.c
diff options
context:
space:
mode:
authorGui Hecheng <guihc.fnst@cn.fujitsu.com>2014-07-17 10:40:37 +0800
committerDavid Sterba <dsterba@suse.cz>2014-08-22 15:07:01 +0200
commitdfe83649cf0cbf8ccc9a1ddba2883a28ad67eff5 (patch)
tree84bd1002ffc24a96d911047e6ab8555eccbfe223 /cmds-scrub.c
parent965cd864491514e319c1f90cfece70437e535990 (diff)
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>
Diffstat (limited to 'cmds-scrub.c')
-rw-r--r--cmds-scrub.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/cmds-scrub.c b/cmds-scrub.c
index f9e2b40b..a604b252 100644
--- a/cmds-scrub.c
+++ b/cmds-scrub.c
@@ -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);