Re: [PATCH 09/18] fs: Introduce per-bucket inode hash locks

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

 



>  #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@xxxxxx>

--
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