+ else {
+ MD_COUNTER_INCREMENT(obd, create);
+ }
+
+ down(&dchild->d_inode->i_sem);
+ if (ino) {
+ rc = mds_update_inode_sid(obd, dchild->d_inode,
+ handle, rec->ur_id2);
+ if (rc) {
+ CERROR("mds_update_inode_sid() failed, "
+ "rc = %d\n", rc);
+ }
+ id_assign_fid(&body->id1, rec->ur_id2);
+
+ /*
+ * make sure, that fid is up-to-date.
+ */
+ mds_set_last_fid(obd, id_fid(rec->ur_id2));
+ } else {
+ rc = mds_alloc_inode_sid(obd, dchild->d_inode,
+ handle, &body->id1);
+ if (rc) {
+ CERROR("mds_alloc_inode_sid() failed, "
+ "rc = %d\n", rc);
+ }
+ }
+ up(&dchild->d_inode->i_sem);
+
+ if (!(rec->ur_flags & O_EXCL)) { /* bug 3313 */
+ rc = fsfilt_commit(obd, dchild->d_inode->i_sb,
+ dchild->d_inode, handle, 0);
+ handle = NULL;
+ }