From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [PATCH ver4] exofs: New truncate sequence Date: Wed, 9 Jun 2010 15:55:12 +0200 Message-ID: <20100609135512.GA26691@lst.de> References: <4C0F5960.6090305@panasas.com> <20100609100213.GC15403@lst.de> <4C0F7653.9080207@panasas.com> <4C0F7695.2020800@panasas.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Christoph Hellwig , Al Viro , linux-fsdevel@vger.kernel.org To: Boaz Harrosh Return-path: Received: from verein.lst.de ([213.95.11.210]:35557 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755123Ab0FINzS (ORCPT ); Wed, 9 Jun 2010 09:55:18 -0400 Content-Disposition: inline In-Reply-To: <4C0F7695.2020800@panasas.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: > + if (unlikely(ret)) { > + struct inode *inode = mapping->host; > + loff_t to = pos + len; > > + if (to > inode->i_size) > + truncate_pagecache(inode, to, inode->i_size); > + } Might be worth to add a exofs_write_failed helper similar to ext2 that can be shared with write_end, and once added ->direct_IO? > + error = inode_newsize_ok(inode, iattr->ia_size); > + if (unlikely(error)) > + return error; This has been folded into inode_change_ok in vfs.git #for_next, you can drop it.