summaryrefslogtreecommitdiffstats
path: root/fs/dcache.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2016-01-22 15:40:57 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2016-01-22 18:04:28 -0500
commit5955102c9984fa081b2d570cfac75c97eecf8f3b (patch)
treea4744386eac4b916e847eb4eedfada158f6527b4 /fs/dcache.c
parent57b8f112cfe6622ddddb8c2641206bb5fa8a112d (diff)
wrappers for ->i_mutex access
parallel to mutex_{lock,unlock,trylock,is_locked,lock_nested}, inode_foo(inode) being mutex_foo(&inode->i_mutex). Please, use those for access to ->i_mutex; over the coming cycle ->i_mutex will become rwsem, with ->lookup() done with it held only shared. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/dcache.c')
-rw-r--r--fs/dcache.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/dcache.c b/fs/dcache.c
index b4539e84e577..92d5140de851 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -2462,7 +2462,7 @@ EXPORT_SYMBOL(d_rehash);
2462 */ 2462 */
2463void dentry_update_name_case(struct dentry *dentry, struct qstr *name) 2463void dentry_update_name_case(struct dentry *dentry, struct qstr *name)
2464{ 2464{
2465 BUG_ON(!mutex_is_locked(&dentry->d_parent->d_inode->i_mutex)); 2465 BUG_ON(!inode_is_locked(dentry->d_parent->d_inode));
2466 BUG_ON(dentry->d_name.len != name->len); /* d_lookup gives this */ 2466 BUG_ON(dentry->d_name.len != name->len); /* d_lookup gives this */
2467 2467
2468 spin_lock(&dentry->d_lock); 2468 spin_lock(&dentry->d_lock);
@@ -2738,7 +2738,7 @@ static int __d_unalias(struct inode *inode,
2738 if (!mutex_trylock(&dentry->d_sb->s_vfs_rename_mutex)) 2738 if (!mutex_trylock(&dentry->d_sb->s_vfs_rename_mutex))
2739 goto out_err; 2739 goto out_err;
2740 m1 = &dentry->d_sb->s_vfs_rename_mutex; 2740 m1 = &dentry->d_sb->s_vfs_rename_mutex;
2741 if (!mutex_trylock(&alias->d_parent->d_inode->i_mutex)) 2741 if (!inode_trylock(alias->d_parent->d_inode))
2742 goto out_err; 2742 goto out_err;
2743 m2 = &alias->d_parent->d_inode->i_mutex; 2743 m2 = &alias->d_parent->d_inode->i_mutex;
2744out_unalias: 2744out_unalias: