From: Maxim Patlasov Date: Mon, 28 Apr 2014 12:19:22 +0000 (+0200) Subject: fuse: update mtime on open(O_TRUNC) in atomic_o_trunc mode X-Git-Tag: omap-for-v3.16/fixes-against-rc1~210^2~10 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=75caeecdf9c7151af5f7d972e2dabbff1bef30a7;p=pandora-kernel.git fuse: update mtime on open(O_TRUNC) in atomic_o_trunc mode In case of fc->atomic_o_trunc is set, fuse does nothing in fuse_do_setattr() while handling open(O_TRUNC). Hence, i_mtime must be updated explicitly in fuse_finish_open(). The patch also adds extra locking encompassing open(O_TRUNC) operation to avoid races between the truncation and updating i_mtime. Signed-off-by: Maxim Patlasov Signed-off-by: Miklos Szeredi --- Reading git-diff-tree failed