lkml.org 
[lkml]   [2011]   [May]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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.



\
 
 \ /
  Last update: 2011-05-10 10:03    [W:0.159 / U:0.716 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site