Whamcloud - gitweb
LU-1842 quota: remove quota code
[fs/lustre-release.git] / lustre / osd-ldiskfs / osd_compat.c
index 408ae93..2c4098b 100644 (file)
@@ -314,16 +314,16 @@ int osd_compat_del_entry(struct osd_thread_info *info, struct osd_device *osd,
         child->d_parent = dird;
         child->d_inode = NULL;
 
-        LOCK_INODE_MUTEX(dir);
-        rc = -ENOENT;
-        bh = osd_ldiskfs_find_entry(dir, child, &de, NULL);
-        if (bh) {
-                rc = ldiskfs_delete_entry(oh->ot_handle, dir, de, bh);
-                brelse(bh);
-        }
-        UNLOCK_INODE_MUTEX(dir);
+       mutex_lock(&dir->i_mutex);
+       rc = -ENOENT;
+       bh = osd_ldiskfs_find_entry(dir, child, &de, NULL);
+       if (bh) {
+               rc = ldiskfs_delete_entry(oh->ot_handle, dir, de, bh);
+               brelse(bh);
+       }
+       mutex_unlock(&dir->i_mutex);
 
-        RETURN(rc);
+       RETURN(rc);
 }
 
 int osd_compat_add_entry(struct osd_thread_info *info, struct osd_device *osd,
@@ -352,11 +352,11 @@ int osd_compat_add_entry(struct osd_thread_info *info, struct osd_device *osd,
         child->d_parent = dir;
         child->d_inode = inode;
 
-        LOCK_INODE_MUTEX(dir->d_inode);
-        rc = osd_ldiskfs_add_entry(oh->ot_handle, child, inode, NULL);
-        UNLOCK_INODE_MUTEX(dir->d_inode);
+       mutex_lock(&dir->d_inode->i_mutex);
+       rc = osd_ldiskfs_add_entry(oh->ot_handle, child, inode, NULL);
+       mutex_unlock(&dir->d_inode->i_mutex);
 
-        RETURN(rc);
+       RETURN(rc);
 }
 
 int osd_compat_objid_lookup(struct osd_thread_info *info,
@@ -398,10 +398,10 @@ int osd_compat_objid_lookup(struct osd_thread_info *info,
         /* XXX: we can use rc from sprintf() instead of strlen() */
         d_seq->d_name.len = strlen(name);
 
-        dir = d->d_inode;
-        LOCK_INODE_MUTEX(dir);
-        bh = osd_ldiskfs_find_entry(dir, d_seq, &de, NULL);
-        UNLOCK_INODE_MUTEX(dir);
+       dir = d->d_inode;
+       mutex_lock(&dir->i_mutex);
+       bh = osd_ldiskfs_find_entry(dir, d_seq, &de, NULL);
+       mutex_unlock(&dir->i_mutex);
 
        if (bh == NULL)
                RETURN(-ENOENT);