From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752858AbbDAHxJ (ORCPT ); Wed, 1 Apr 2015 03:53:09 -0400 Received: from cantor2.suse.de ([195.135.220.15]:58803 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752340AbbDAHxG (ORCPT ); Wed, 1 Apr 2015 03:53:06 -0400 Date: Wed, 1 Apr 2015 09:53:01 +0200 From: Jan Kara To: Taesoo Kim Cc: jack@suse.cz, linux-kernel@vger.kernel.org, taesoo@gatech.edu, changwoo@gatech.edu, sanidhya@gatech.edu, blee@gatech.edu, csong84@gatech.edu Subject: Re: [PATCH 1/1] udf: block-based fs should use generic_write_end() Message-ID: <20150401075301.GB26339@quack.suse.cz> References: <1426822679-18076-1-git-send-email-tsgatesv@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1426822679-18076-1-git-send-email-tsgatesv@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu 19-03-15 23:37:59, Taesoo Kim wrote: > simple_write_end() is for non-block fs, which doesn't invoke > mark_inode_dirty(). Instead, generic_write_end() correctly > handles such case when i_size has changed. > > Signed-off-by: Taesoo Kim So simple_write_end() is actually correct in that place. We cannot even use generic_write_end() because that page doesn't have buffers attached - it's a special case of a file which is smaller than a block and is packed in the inode. Please test the patch better next time - this would oops on you the first time you try to write to such a file. Thanks! Honza > --- > fs/udf/file.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/udf/file.c b/fs/udf/file.c > index 08f3555..28b1dab 100644 > --- a/fs/udf/file.c > +++ b/fs/udf/file.c > @@ -112,7 +112,7 @@ const struct address_space_operations udf_adinicb_aops = { > .readpage = udf_adinicb_readpage, > .writepage = udf_adinicb_writepage, > .write_begin = udf_adinicb_write_begin, > - .write_end = simple_write_end, > + .write_end = generic_write_end, > .direct_IO = udf_adinicb_direct_IO, > }; > > -- > 2.3.3 > -- Jan Kara SUSE Labs, CR