}
iov_iter_bvec(&iter, is_write, bvec, sgl_nents, len);
- if (is_write)
+ if (is_write) {
+ file_start_write(fd);
ret = vfs_iter_write(fd, &iter, &pos, 0);
- else
+ file_end_write(fd);
+ } else {
ret = vfs_iter_read(fd, &iter, &pos, 0);
-
+ }
if (is_write) {
if (ret < 0 || ret != data_length) {
pr_err("%s() write returned %d\n", __func__, ret);
}
iov_iter_bvec(&iter, ITER_SOURCE, bvec, nolb, len);
+ file_start_write(fd_dev->fd_file);
ret = vfs_iter_write(fd_dev->fd_file, &iter, &pos, 0);
+ file_end_write(fd_dev->fd_file);
kfree(bvec);
if (ret < 0 || ret != len) {