Re: [PATCH 2/14] HPFS: Introduce a global mutex and lock it on everycallback from VFS.

From: Christoph Hellwig
Date: Tue May 10 2011 - 04:00:39 EST


> static inline void hpfs_lock(struct super_block *s)
> {
> + struct hpfs_sb_info *sbi = hpfs_sb(s);
> + mutex_lock(&sbi->hpfs_mutex);
> }
>
> static inline void hpfs_unlock(struct super_block *s)
> {
> + struct hpfs_sb_info *sbi = hpfs_sb(s);
> + mutex_unlock(&sbi->hpfs_mutex);
> +}
> +
> +static inline void hpfs_lock_assert(struct super_block *s)
> +{
> + struct hpfs_sb_info *sbi = hpfs_sb(s);
> + WARN_ON(!mutex_is_locked(&sbi->hpfs_mutex));
> }

These locks just obsfucate what's going on. Just call the mutex
helpers directly.

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