From mboxrd@z Thu Jan 1 00:00:00 1970 From: Boaz Harrosh Subject: Re: [PATCH 47/58] convert exofs to ->evict_inode() Date: Wed, 09 Jun 2010 12:05:36 +0300 Message-ID: <4C0F5960.6090305@panasas.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: linux-fsdevel@vger.kernel.org, Christoph Hellwig To: Al Viro Return-path: Received: from daytona.panasas.com ([67.152.220.89]:63891 "EHLO daytona.int.panasas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756680Ab0FIJFj (ORCPT ); Wed, 9 Jun 2010 05:05:39 -0400 In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On 06/09/2010 01:22 AM, Al Viro wrote: > > Signed-off-by: Al Viro Al hi. This patch is nice off course, but it clashes with a patch I was intending to push to linux-next today. (For 2.6.36 kernel) The patch is the one to convert to the new truncate sequence: http://marc.info/?l=linux-fsdevel&m=127539189718732&w=2 In fact I was meaning to ask you if you could take this patch through your tree, so Christoph could base his cleanup on this as well. I can re-do below patch on top of mine, or redo the truncate on top of this. Please tell me what you prefer. Thanks Boaz > --- > fs/exofs/exofs.h | 2 +- > fs/exofs/inode.c | 8 ++++---- > fs/exofs/super.c | 2 +- > 3 files changed, 6 insertions(+), 6 deletions(-) > > diff --git a/fs/exofs/exofs.h b/fs/exofs/exofs.h > index 22721b2..1a566bf 100644 > --- a/fs/exofs/exofs.h > +++ b/fs/exofs/exofs.h > @@ -264,7 +264,7 @@ int exofs_write_begin(struct file *file, struct address_space *mapping, > extern struct inode *exofs_iget(struct super_block *, unsigned long); > struct inode *exofs_new_inode(struct inode *, int); > extern int exofs_write_inode(struct inode *, struct writeback_control *wbc); > -extern void exofs_delete_inode(struct inode *); > +extern void exofs_evict_inode(struct inode *); > > /* dir.c: */ > int exofs_add_link(struct dentry *, struct inode *); > diff --git a/fs/exofs/inode.c b/fs/exofs/inode.c > index 4bfc1f4..0c9c23d 100644 > --- a/fs/exofs/inode.c > +++ b/fs/exofs/inode.c > @@ -1335,7 +1335,7 @@ static void delete_done(struct exofs_io_state *ios, void *p) > * from the OSD here. We make sure the object was created before we try and > * delete it. > */ > -void exofs_delete_inode(struct inode *inode) > +void exofs_evict_inode(struct inode *inode) > { > struct exofs_i_info *oi = exofs_i(inode); > struct super_block *sb = inode->i_sb; > @@ -1345,7 +1345,7 @@ void exofs_delete_inode(struct inode *inode) > > truncate_inode_pages(&inode->i_data, 0); > > - if (is_bad_inode(inode)) > + if (inode->i_nlink || is_bad_inode(inode)) > goto no_delete; > > mark_inode_dirty(inode); > @@ -1355,7 +1355,7 @@ void exofs_delete_inode(struct inode *inode) > if (inode->i_blocks) > exofs_truncate(inode); > > - clear_inode(inode); > + end_writeback(inode); > > ret = exofs_get_io_state(&sbi->layout, &ios); > if (unlikely(ret)) { > @@ -1384,5 +1384,5 @@ void exofs_delete_inode(struct inode *inode) > return; > > no_delete: > - clear_inode(inode); > + end_writeback(inode); > } > diff --git a/fs/exofs/super.c b/fs/exofs/super.c > index 03149b9..32cfd61 100644 > --- a/fs/exofs/super.c > +++ b/fs/exofs/super.c > @@ -743,7 +743,7 @@ static const struct super_operations exofs_sops = { > .alloc_inode = exofs_alloc_inode, > .destroy_inode = exofs_destroy_inode, > .write_inode = exofs_write_inode, > - .delete_inode = exofs_delete_inode, > + .evict_inode = exofs_evict_inode, > .put_super = exofs_put_super, > .write_super = exofs_write_super, > .sync_fs = exofs_sync_fs,