diff --git a/lustre/mds/mds_open.c b/lustre/mds/mds_open.c index 3a8fd77a97b6ab9d5ccd44d9032db83e555c60ce..9d947a1e7feb4503bc2e74c8d9f45920026405e9 100644 --- a/lustre/mds/mds_open.c +++ b/lustre/mds/mds_open.c @@ -789,24 +789,11 @@ int mds_pin(struct ptlrpc_request *req, int offset) int mds_lock_new_child(struct obd_device *obd, struct inode *inode, struct lustre_handle *child_lockh) { - struct ldlm_res_id child_res_id = { .name = { 0, 0, 0, 0 } }; + struct ldlm_res_id child_res_id = { .name = { inode->i_ino, 0, 1, 0 } }; struct lustre_handle lockh; - struct lustre_id sid; int lock_flags = 0; int rc; - down(&inode->i_sem); - rc = mds_read_inode_sid(obd, inode, &sid); - up(&inode->i_sem); - if (rc) { - CERROR("Can't read inode self id, err = %d\n", rc); - RETURN(rc); - } - - child_res_id.name[0] = id_fid(&sid); - child_res_id.name[1] = id_group(&sid); - child_res_id.name[2] = 1; - if (child_lockh == NULL) child_lockh = &lockh;