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>
This commit is contained in:
@@ -215,7 +215,7 @@ static int ceph_get_name(struct dentry *parent, char *name,
|
||||
if (IS_ERR(req))
|
||||
return PTR_ERR(req);
|
||||
|
||||
mutex_lock(&d_inode(parent)->i_mutex);
|
||||
inode_lock(d_inode(parent));
|
||||
|
||||
req->r_inode = d_inode(child);
|
||||
ihold(d_inode(child));
|
||||
@@ -224,7 +224,7 @@ static int ceph_get_name(struct dentry *parent, char *name,
|
||||
req->r_num_caps = 2;
|
||||
err = ceph_mdsc_do_request(mdsc, NULL, req);
|
||||
|
||||
mutex_unlock(&d_inode(parent)->i_mutex);
|
||||
inode_unlock(d_inode(parent));
|
||||
|
||||
if (!err) {
|
||||
struct ceph_mds_reply_info_parsed *rinfo = &req->r_reply_info;
|
||||
|
Reference in New Issue
Block a user