Skip to content

Commit

Permalink
Bugfix bfs_mount (#696)
Browse files Browse the repository at this point in the history
  • Loading branch information
bluebore committed Dec 14, 2016
1 parent 028736d commit fa5dc54
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions fuse/bfs_mount.cc
Original file line number Diff line number Diff line change
Expand Up @@ -372,12 +372,13 @@ int bfs_fsync(const char* path, int /*datasync*/, struct fuse_file_info* finfo)
retval = -EIO;
}
int wlen = file->Write(mfile->buf, mfile->file_size);
if (wlen < mfile->buf_len) {
fprintf(stderr, BFSERR"Write(%s, %d) for release fail\n", path, mfile->buf_len);
if (wlen < mfile->file_size) {
fprintf(stderr, BFSERR"Write(%s, %ld) for fsync fail\n", path, mfile->file_size);
delete file;
file = NULL;
retval = -EIO;
} else {
fprintf(stderr, BFS"Write(%s, %ld) for fsync\n", path ,mfile->file_size);
delete[] mfile->buf;
mfile->buf = NULL;
}
Expand Down

0 comments on commit fa5dc54

Please sign in to comment.