• Christoph Hellwig's avatar
    fs: simplify the generic_write_sync prototype · e2592217
    Christoph Hellwig authored
    The kiocb already has the new position, so use that.  The only interesting
    case is AIO, where we currently don't bother updating ki_pos.  We're about
    to free the kiocb after we're done, so we might as well update it to make
    everyone's life simpler.
    While we're at it also return the bytes written argument passed in if
    we were successful so that the boilerplate error switch code in the
    callers can go away.
    Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
    Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
file.c 44.4 KB