From: Christoph Hellwig Subject: list_move in prune_icache_sb Date: Fri, 2 Sep 2011 07:02:05 -0400 Message-ID: <20110902110205.GA1909@infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org To: david@fromorbit.com Return-path: Received: from 173-166-109-252-newengland.hfc.comcastbusiness.net ([173.166.109.252]:38789 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933383Ab1IBLCH (ORCPT ); Fri, 2 Sep 2011 07:02:07 -0400 Content-Disposition: inline Sender: linux-fsdevel-owner@vger.kernel.org List-ID: /* * we are inverting the sb->s_inode_lru_lock/inode->i_lock here, * so use a trylock. If we fail to get the lock, just move the * inode to the back of the list so we don't spin on it. */ if (!spin_trylock(&inode->i_lock)) { list_move(&inode->i_lru, &sb->s_inode_lru); continue; } was introduced in "fs: Lock the inode LRU list separately". But list_move moves to the front of the list, where the item already is, making this a no-op. Should probably be a list_move_tail.