From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: MIME-Version: 1.0 In-Reply-To: <20160720011135.7038.47635.stgit@maxim-thinkpad> References: <20160720011135.7038.47635.stgit@maxim-thinkpad> From: Miklos Szeredi Date: Thu, 21 Jul 2016 12:28:41 +0200 Message-ID: Subject: Re: [PATCH v2] fuse: fuse_flush must check mapping->flags for errors To: Maxim Patlasov Cc: linux-fsdevel@vger.kernel.org, fuse-devel , devel@openvz.org, linux-kernel@vger.kernel.org, kuznet@virtuozzo.com Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: On Wed, Jul 20, 2016 at 3:12 AM, Maxim Patlasov wrote: > fuse_flush() calls write_inode_now() that triggers writeback, but actual > writeback will happen later, on fuse_sync_writes(). If an error happens, > fuse_writepage_end() will set error bit in mapping->flags. So, we have to > check mapping->flags after fuse_sync_writes(). > > Changed in v2: > - fixed silly type: check must be *after* fuse_sync_writes() I applied both with a cleanup patch at the end to use the filemap_check_errors() helper, which does exactly this. Thanks, Miklos