Messages in this thread | | | Date | Tue, 10 May 2011 04:00:30 -0400 | From | Christoph Hellwig <> | Subject | Re: [PATCH 2/14] HPFS: Introduce a global mutex and lock it on every callback from VFS. |
| |
> 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.
| |