* this function will flush buffer on a file descriptor. * * @param fd the file descriptor. * * @return 0 on successful, -1 on failed. */
| 559 | * @return 0 on successful, -1 on failed. |
| 560 | */ |
| 561 | int dfs_file_flush(struct dfs_file *fd) |
| 562 | { |
| 563 | if (fd == NULL) |
| 564 | return -EINVAL; |
| 565 | |
| 566 | if (fd->vnode->fops->flush == NULL) |
| 567 | return -ENOSYS; |
| 568 | |
| 569 | return fd->vnode->fops->flush(fd); |
| 570 | } |
| 571 | |
| 572 | /** |
| 573 | * this function will seek the offset for specified file descriptor. |
no outgoing calls