aboutsummaryrefslogtreecommitdiffstats
path: root/fs/relayfs
diff options
context:
space:
mode:
Diffstat (limited to 'fs/relayfs')
-rw-r--r--fs/relayfs/inode.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/relayfs/inode.c b/fs/relayfs/inode.c
index 7b7f2cb5f0e1..383523011aad 100644
--- a/fs/relayfs/inode.c
+++ b/fs/relayfs/inode.c
@@ -109,7 +109,7 @@ static struct dentry *relayfs_create_entry(const char *name,
109 } 109 }
110 110
111 parent = dget(parent); 111 parent = dget(parent);
112 down(&parent->d_inode->i_sem); 112 mutex_lock(&parent->d_inode->i_mutex);
113 d = lookup_one_len(name, parent, strlen(name)); 113 d = lookup_one_len(name, parent, strlen(name));
114 if (IS_ERR(d)) { 114 if (IS_ERR(d)) {
115 d = NULL; 115 d = NULL;
@@ -139,7 +139,7 @@ release_mount:
139 simple_release_fs(&relayfs_mount, &relayfs_mount_count); 139 simple_release_fs(&relayfs_mount, &relayfs_mount_count);
140 140
141exit: 141exit:
142 up(&parent->d_inode->i_sem); 142 mutex_unlock(&parent->d_inode->i_mutex);
143 dput(parent); 143 dput(parent);
144 return d; 144 return d;
145} 145}
@@ -204,7 +204,7 @@ int relayfs_remove(struct dentry *dentry)
204 return -EINVAL; 204 return -EINVAL;
205 205
206 parent = dget(parent); 206 parent = dget(parent);
207 down(&parent->d_inode->i_sem); 207 mutex_lock(&parent->d_inode->i_mutex);
208 if (dentry->d_inode) { 208 if (dentry->d_inode) {
209 if (S_ISDIR(dentry->d_inode->i_mode)) 209 if (S_ISDIR(dentry->d_inode->i_mode))
210 error = simple_rmdir(parent->d_inode, dentry); 210 error = simple_rmdir(parent->d_inode, dentry);
@@ -215,7 +215,7 @@ int relayfs_remove(struct dentry *dentry)
215 } 215 }
216 if (!error) 216 if (!error)
217 dput(dentry); 217 dput(dentry);
218 up(&parent->d_inode->i_sem); 218 mutex_unlock(&parent->d_inode->i_mutex);
219 dput(parent); 219 dput(parent);
220 220
221 if (!error) 221 if (!error)
@@ -476,7 +476,7 @@ static ssize_t relay_file_read(struct file *filp,
476 ssize_t ret = 0; 476 ssize_t ret = 0;
477 void *from; 477 void *from;
478 478
479 down(&inode->i_sem); 479 mutex_lock(&inode->i_mutex);
480 if(!relay_file_read_avail(buf, *ppos)) 480 if(!relay_file_read_avail(buf, *ppos))
481 goto out; 481 goto out;
482 482
@@ -494,7 +494,7 @@ static ssize_t relay_file_read(struct file *filp,
494 relay_file_read_consume(buf, read_start, count); 494 relay_file_read_consume(buf, read_start, count);
495 *ppos = relay_file_read_end_pos(buf, read_start, count); 495 *ppos = relay_file_read_end_pos(buf, read_start, count);
496out: 496out:
497 up(&inode->i_sem); 497 mutex_unlock(&inode->i_mutex);
498 return ret; 498 return ret;
499} 499}
500 500