__generic_file_write_iter(9)

__generic_file_write_iter9

Write data to a file

Usage

ssize_t __generic_file_write_iter(struct kiocb * iocb, struct iov_iter * from);

Arguments

iocb

IO state structure (file, offset, etc.)

from

iov_iter with data to write

Overview

This function does all the work needed for actually writing data to a file. It does all basic checks, removes SUID from the file, updates modification times and calls proper subroutines depending on whether we do direct IO or a standard buffered write.

It expects i_mutex to be grabbed unless we work on a block device or similar object which does not need locking at all.

This function does *not* take care of syncing data in case of O_SYNC write. A caller has to handle it. This is mainly due to the fact that we want to avoid syncing under i_mutex.

Releases

2 releases since Debian 8 (Jessie); the text changed 1 time.

  1. 8
  2. 9

From linux-manual-4.9 4.9.228-1 in Debian 9 (Stretch). Parsed by carta from the page's man source.