From 0b8def9d6dfa6b2a9a2740cf81d8d2c134688d39 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 7 Apr 2015 10:22:53 -0400 Subject: [PATCH] __generic_file_write_iter: keep ->ki_pos and return value consistent A side effect worth noting: in O_APPEND case we set ->ki_pos early, so if it turns out to be an error or a zero-length write, we'll end up with ->ki_pos modified. Safe, since all callers never look at the ->ki_pos after the call of __generic_file_write_iter() returning non-positive, all the way to caller of ->write_iter() and those discard ->ki_pos when getting that. Signed-off-by: Al Viro --- Reading git-format-patch failed