]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/sysfs/inode.c
[PATCH] mutex subsystem, semaphore to mutex: VFS, ->i_sem
[linux-2.6-omap-h63xx.git] / fs / sysfs / inode.c
index 970a33f03299b12731401a55dbdbe2a1c547c3c0..c3133219941cbeaa8deacc5fb13f012a6c2945b0 100644 (file)
@@ -201,7 +201,7 @@ const unsigned char * sysfs_get_name(struct sysfs_dirent *sd)
 
 /*
  * Unhashes the dentry corresponding to given sysfs_dirent
- * Called with parent inode's i_sem held.
+ * Called with parent inode's i_mutex held.
  */
 void sysfs_drop_dentry(struct sysfs_dirent * sd, struct dentry * parent)
 {
@@ -232,7 +232,7 @@ void sysfs_hash_and_remove(struct dentry * dir, const char * name)
                /* no inode means this hasn't been made visible yet */
                return;
 
-       down(&dir->d_inode->i_sem);
+       mutex_lock(&dir->d_inode->i_mutex);
        list_for_each_entry(sd, &parent_sd->s_children, s_sibling) {
                if (!sd->s_element)
                        continue;
@@ -243,7 +243,5 @@ void sysfs_hash_and_remove(struct dentry * dir, const char * name)
                        break;
                }
        }
-       up(&dir->d_inode->i_sem);
+       mutex_unlock(&dir->d_inode->i_mutex);
 }
-
-