[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20101013114126.GE19456@infradead.org>
Date: Wed, 13 Oct 2010 07:41:26 -0400
From: Christoph Hellwig <hch@...radead.org>
To: Dave Chinner <david@...morbit.com>
Cc: linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 09/18] fs: Introduce per-bucket inode hash locks
> #include <linux/mount.h>
> #include <linux/async.h>
> #include <linux/posix_acl.h>
> +#include <linux/bit_spinlock.h>
list_bl.h already includes bit_spinlock.h, so you shouldn't actually
need it here.
> @@ -2154,7 +2154,7 @@ static int shmem_encode_fh(struct dentry *dentry, __u32 *fh, int *len,
> */
> static DEFINE_SPINLOCK(lock);
> spin_lock(&lock);
> - if (hlist_unhashed(&inode->i_hash))
> + if (inode_unhashed(inode))
> __insert_inode_hash(inode,
> inode->i_ino + inode->i_generation);
> spin_unlock(&lock);
That's some amazingly ugly code. Just keeping the hash bucket lock
over the inode_unhashed check and the insert would remove the need for
the weird local spinlock. But that's probably best left for a later
patch.
Looks good,
Reviewed-by: Christoph Hellwig <hch@....de>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists