Re: [PATCH 2/4] fs: factor inode disposal

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>  /*
> + * Free the inode passed in, removing it from the lists it is still connected
> + * to but avoiding unnecessary lock round-trips for the lists it is no longer
> + * on.
> + *
> + * An inode must already be marked I_FREEING so that we avoid the inode being
> + * moved back onto lists if we race with other code that manipulates the lists
> + * (e.g. writeback_single_inode_inode). The caller is responsisble for setting this.

Too long line.

> + */
> +static void dispose_one_inode(struct inode *inode)
> +{
> +	BUG_ON(!(inode->i_state & I_FREEING));
> +
> +	spin_lock(&inode_lock);
> +	list_del_init(&inode->i_wb_list);
> +	__remove_inode_hash(inode);
> +	__inode_sb_list_del(inode);
> +	spin_unlock(&inode_lock);
> +
> +	evict(inode);
> +
> +	wake_up_inode(inode);
> +	BUG_ON(inode->i_state != (I_FREEING | I_CLEAR));
> +	destroy_inode(inode);
> +}

As this is the only caller of evict left I think the code should just
be added to evict instead of a new function.  Also the hash removal
should happen after evict, so that __wait_on_freeing_inode still works.

--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux