inodes_stat.nr_unused++;
__sync_single_inode(struct inode *inode, struct writeback_control *wbc){	unsigned dirty;	struct address_space *mapping = inode->i_mapping;	struct super_block *sb = inode->i_sb;	int wait = wbc->sync_mode == WB_SYNC_ALL;	int ret;	BUG_ON(inode->i_state & I_LOCK);	/* Set I_LOCK, reset I_DIRTY */	dirty = inode->i_state & I_DIRTY;	inode->i_state |= I_LOCK;	inode->i_state &= ~I_DIRTY;	spin_unlock(&inode_lock);	ret = do_writepages(mapping, wbc);	/* Don't write the inode if only I_DIRTY_PAGES was set */	if (dirty & (I_DIRTY_SYNC | I_DIRTY_DATASYNC)) {		int err = write_inode(inode, wait);		if (ret == 0)			ret = err;	}	if (wait) {		int err = filemap_fdatawait(mapping);		if (ret == 0)			ret = err;	}	spin_lock(&inode_lock);	inode->i_state &= ~I_LOCK;	if (!(inode->i_state & I_FREEING)) {		if (!(inode->i_state & I_DIRTY) &&		    mapping_tagged(mapping, PAGECACHE_TAG_DIRTY)) {			/*			 * We didn't write back all the pages.  nfs_writepages()			 * sometimes bales out without doing anything. Redirty			 * the inode.  It is still on sb->s_io.			 */			if (wbc->for_kupdate) {				/*				 * For the kupdate function we leave the inode				 * at the head of sb_dirty so it will get more				 * writeout as soon as the queue becomes				 * uncongested.				 */				inode->i_state |= I_DIRTY_PAGES;				list_move_tail(&inode->i_list, &sb->s_dirty);			} else {				/*				 * Otherwise fully redirty the inode so that				 * other inodes on this superblock will get some				 * writeout.  Otherwise heavy writing to one				 * file would indefinitely suspend writeout of				 * all the other files.				 */				inode->i_state |= I_DIRTY_PAGES;				inode->dirtied_when = jiffies;				list_move(&inode->i_list, &sb->s_dirty);			}		} else if (inode->i_state & I_DIRTY) {			/*			 * Someone redirtied the inode while were writing back			 * the pages.			 */			list_move(&inode->i_list, &sb->s_dirty);		} else if (atomic_read(&inode->i_count)) {			/*			 * The inode is clean, inuse			 */			list_move(&inode->i_list, &inode_in_use);		} else {			/*			 * The inode is clean, unused			 */			list_move(&inode->i_list, &inode_unused);			inodes_stat.nr_unused++;		}	}	wake_up_inode(inode);	return ret;}