]> git.baikalelectronics.ru Git - kernel.git/commit
fs: simplify the generic_write_sync prototype
authorChristoph Hellwig <hch@lst.de>
Thu, 7 Apr 2016 15:52:01 +0000 (08:52 -0700)
committerAl Viro <viro@zeniv.linux.org.uk>
Sun, 1 May 2016 23:58:39 +0000 (19:58 -0400)
commit041a569f309e0d4244ebc1429d65fd9b493bc8f0
tree6f940ba17f38b693e495ad5267b1988dd66c9c0f
parent916f0f7fda0292005ae8a47e86bb5d2d318cc1ef
fs: simplify the generic_write_sync prototype

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: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 files changed:
fs/block_dev.c
fs/btrfs/file.c
fs/cifs/file.c
fs/direct-io.c
fs/ext4/file.c
fs/f2fs/file.c
fs/nfs/direct.c
fs/ntfs/file.c
fs/udf/file.c
fs/xfs/xfs_file.c
include/linux/fs.h
mm/filemap.c