From fb58b7316a99703afb8d076b0e5f3e1e387e4b30 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Mon, 12 Feb 2007 00:51:57 -0800 Subject: [PATCH] move remove_dquot_ref to dqout.c Remove_dquot_ref can move to dqout.c instead of beeing in inode.c under #ifdef CONFIG_QUOTA. Also clean the resulting code up a tiny little bit by testing sb->dq_op earlier - it's constant over a filesystems lifetime. Signed-off-by: Christoph Hellwig Cc: Jan Kara Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- fs/inode.c | 27 --------------------------- 1 file changed, 27 deletions(-) (limited to 'fs/inode.c') diff --git a/fs/inode.c b/fs/inode.c index e6d93070f14..5e32432a760 100644 --- a/fs/inode.c +++ b/fs/inode.c @@ -1251,33 +1251,6 @@ int inode_needs_sync(struct inode *inode) EXPORT_SYMBOL(inode_needs_sync); -/* - * Quota functions that want to walk the inode lists.. - */ -#ifdef CONFIG_QUOTA - -void remove_dquot_ref(struct super_block *sb, int type, - struct list_head *tofree_head) -{ - struct inode *inode; - - if (!sb->dq_op) - return; /* nothing to do */ - spin_lock(&inode_lock); /* This lock is for inodes code */ - - /* - * We don't have to lock against quota code - test IS_QUOTAINIT is - * just for speedup... - */ - list_for_each_entry(inode, &sb->s_inodes, i_sb_list) - if (!IS_NOQUOTA(inode)) - remove_inode_dquot_ref(inode, type, tofree_head); - - spin_unlock(&inode_lock); -} - -#endif - int inode_wait(void *word) { schedule(); -- cgit v1.2.3