forked from Mirrors/btrfs-progs
btrfs-progs: fix copy-n-paste error checking
copy_one_inline() meant to test the return of pwrite() with ram_size. Presumably the comparison with len was copied from the test earlier in the function. Signed-off-by: Zach Brown <zab@redhat.com>master
parent
d86394da23
commit
ba4791fde3
|
@ -173,7 +173,7 @@ static int copy_one_inline(int fd, struct btrfs_path *path, u64 pos)
|
|||
|
||||
done = pwrite(fd, outbuf, ram_size, pos);
|
||||
free(outbuf);
|
||||
if (done < len) {
|
||||
if (done < ram_size) {
|
||||
fprintf(stderr, "Short compressed inline write, wanted %d, "
|
||||
"did %zd: %d\n", ram_size, done, errno);
|
||||
return -1;
|
||||
|
|
Loading…
Reference in New Issue