From: Edward Shishkin Date: Tue, 26 Oct 2010 21:22:28 +0000 (-0700) Subject: fs/direct-io.c: fix truncation error in dio_complete() return X-Git-Tag: firefly_0821_release~7613^2~3628^2~81 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=cd1c584f380183aca268d454c14b22d8454eac4f;p=firefly-linux-kernel-4.4.55.git fs/direct-io.c: fix truncation error in dio_complete() return Fix up truncation (ssize_t->int). This only matters with >2G reads/writes, which the kernel doesn't permit. Signed-off-by: Edward Shishkin Reviewed-by: Christoph Hellwig Acked-by: Jeff Moyer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/direct-io.c b/fs/direct-io.c index 48d74c7391d1..85882f6ba5f7 100644 --- a/fs/direct-io.c +++ b/fs/direct-io.c @@ -218,7 +218,7 @@ static struct page *dio_get_page(struct dio *dio) * filesystems can use it to hold additional state between get_block calls and * dio_complete. */ -static int dio_complete(struct dio *dio, loff_t offset, int ret, bool is_async) +static ssize_t dio_complete(struct dio *dio, loff_t offset, ssize_t ret, bool is_async) { ssize_t transferred = 0;