From: Al Viro Subject: [PATCH 54/58] fs/inode.c:clear_inode() is gone Date: Tue, 08 Jun 2010 23:23:53 +0100 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: linux-fsdevel@vger.kernel.org Return-path: Received: from zeniv.linux.org.uk ([195.92.253.2]:42289 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932241Ab0FHWXy (ORCPT ); Tue, 8 Jun 2010 18:23:54 -0400 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.69 #1 (Red Hat Linux)) id 1OM7D7-0004g1-GM for linux-fsdevel@vger.kernel.org; Tue, 08 Jun 2010 22:23:53 +0000 Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Signed-off-by: Al Viro --- fs/inode.c | 28 ++++------------------------ include/linux/fs.h | 1 - 2 files changed, 4 insertions(+), 25 deletions(-) diff --git a/fs/inode.c b/fs/inode.c index 00c65d8..0d8aa56 100644 --- a/fs/inode.c +++ b/fs/inode.c @@ -306,29 +306,6 @@ void end_writeback(struct inode *inode) } EXPORT_SYMBOL(end_writeback); -/** - * clear_inode - clear an inode - * @inode: inode to clear - * - * This is called by the filesystem to tell us - * that the inode is no longer useful. We just - * terminate it with extreme prejudice. - */ -void clear_inode(struct inode *inode) -{ - might_sleep(); - invalidate_inode_buffers(inode); - - BUG_ON(inode->i_data.nrpages); - BUG_ON(!(inode->i_state & I_FREEING)); - BUG_ON(inode->i_state & I_CLEAR); - inode_sync_wait(inode); - if (inode->i_sb->s_op->clear_inode) - inode->i_sb->s_op->clear_inode(inode); - inode->i_state = I_FREEING | I_CLEAR; -} -EXPORT_SYMBOL(clear_inode); - static void evict(struct inode *inode) { const struct super_operations *op = inode->i_sb->s_op; @@ -338,7 +315,10 @@ static void evict(struct inode *inode) } else { if (inode->i_data.nrpages) truncate_inode_pages(&inode->i_data, 0); - clear_inode(inode); + invalidate_inode_buffers(inode); + end_writeback(inode); + if (op->clear_inode) + op->clear_inode(inode); } if (S_ISBLK(inode->i_mode) && inode->i_bdev) bd_forget(inode); diff --git a/include/linux/fs.h b/include/linux/fs.h index b051ac6..801b0f2 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -2168,7 +2168,6 @@ extern void unlock_new_inode(struct inode *); extern void __iget(struct inode * inode); extern void iget_failed(struct inode *); -extern void clear_inode(struct inode *); extern void end_writeback(struct inode *); extern void destroy_inode(struct inode *); extern void __destroy_inode(struct inode *); -- 1.5.6.5