BACKPORT - turn inode mutexes into semaphores for 2.6.15 and earlier

diff -r 106cd9ebaa99 drivers/infiniband/hw/ipath/ipath_fs.c
--- a/drivers/infiniband/hw/ipath/ipath_fs.c	Wed Aug 23 13:58:33 2006 -0700
+++ b/drivers/infiniband/hw/ipath/ipath_fs.c	Wed Aug 23 13:58:30 2006 -0700
@@ -87,14 +87,14 @@ static int create_file(const char *name,
 	int error;
 
 	*dentry = NULL;
-	mutex_lock(&parent->d_inode->i_mutex);
+	down(&parent->d_inode->i_sem);
 	*dentry = lookup_one_len(name, parent, strlen(name));
 	if (!IS_ERR(dentry))
 		error = ipathfs_mknod(parent->d_inode, *dentry,
 				      mode, fops, data);
 	else
 		error = PTR_ERR(dentry);
-	mutex_unlock(&parent->d_inode->i_mutex);
+	up(&parent->d_inode->i_sem);
 
 	return error;
 }
@@ -483,7 +483,7 @@ static int remove_device_files(struct su
 	int ret;
 
 	root = dget(sb->s_root);
-	mutex_lock(&root->d_inode->i_mutex);
+	down(&root->d_inode->i_sem);
 	snprintf(unit, sizeof unit, "%02d", dd->ipath_unit);
 	dir = lookup_one_len(unit, root, strlen(unit));
 
@@ -501,7 +501,7 @@ static int remove_device_files(struct su
 	ret = simple_rmdir(root->d_inode, dir);
 
 bail:
-	mutex_unlock(&root->d_inode->i_mutex);
+	up(&root->d_inode->i_sem);
 	dput(root);
 	return ret;
 }
