Commit 0de6d6b9 authored by Ryusuke Konishi's avatar Ryusuke Konishi Committed by Linus Torvalds

nilfs2: use bgl_lock_ptr()

Simplify nilfs_mdt_bgl_lock() by utilizing bgl_lock_ptr() helper in
<linux/blockgroup_lock.h>.
Signed-off-by: default avatarRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent ead8ecff
...@@ -111,7 +111,10 @@ static inline __u64 nilfs_mdt_cno(struct inode *inode) ...@@ -111,7 +111,10 @@ static inline __u64 nilfs_mdt_cno(struct inode *inode)
return ((struct the_nilfs *)inode->i_sb->s_fs_info)->ns_cno; return ((struct the_nilfs *)inode->i_sb->s_fs_info)->ns_cno;
} }
#define nilfs_mdt_bgl_lock(inode, bg) \ static inline spinlock_t *
(&NILFS_MDT(inode)->mi_bgl->locks[(bg) & (NR_BG_LOCKS-1)].lock) nilfs_mdt_bgl_lock(struct inode *inode, unsigned int block_group)
{
return bgl_lock_ptr(NILFS_MDT(inode)->mi_bgl, block_group);
}
#endif /* _NILFS_MDT_H */ #endif /* _NILFS_MDT_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment