diff options
author | David Woodhouse <dwmw2@infradead.org> | 2008-04-22 10:13:40 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@infradead.org> | 2008-04-22 10:13:40 -0400 |
commit | ced22070363ef50e4a47aadd003a81ebeaa3f917 (patch) | |
tree | 66f094dce47a5a0f8f9936308fffe57e2c50255a /fs/jffs2/file.c | |
parent | 52f8301437a0ba744265e0549ee7239eb85426fc (diff) |
[JFFS2] semaphore->mutex conversion
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'fs/jffs2/file.c')
-rw-r--r-- | fs/jffs2/file.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/fs/jffs2/file.c b/fs/jffs2/file.c index dcc2734e0b5d..5e920343b2c5 100644 --- a/fs/jffs2/file.c +++ b/fs/jffs2/file.c | |||
@@ -115,9 +115,9 @@ static int jffs2_readpage (struct file *filp, struct page *pg) | |||
115 | struct jffs2_inode_info *f = JFFS2_INODE_INFO(pg->mapping->host); | 115 | struct jffs2_inode_info *f = JFFS2_INODE_INFO(pg->mapping->host); |
116 | int ret; | 116 | int ret; |
117 | 117 | ||
118 | down(&f->sem); | 118 | mutex_lock(&f->sem); |
119 | ret = jffs2_do_readpage_unlock(pg->mapping->host, pg); | 119 | ret = jffs2_do_readpage_unlock(pg->mapping->host, pg); |
120 | up(&f->sem); | 120 | mutex_unlock(&f->sem); |
121 | return ret; | 121 | return ret; |
122 | } | 122 | } |
123 | 123 | ||
@@ -154,7 +154,7 @@ static int jffs2_write_begin(struct file *filp, struct address_space *mapping, | |||
154 | if (ret) | 154 | if (ret) |
155 | goto out_page; | 155 | goto out_page; |
156 | 156 | ||
157 | down(&f->sem); | 157 | mutex_lock(&f->sem); |
158 | memset(&ri, 0, sizeof(ri)); | 158 | memset(&ri, 0, sizeof(ri)); |
159 | 159 | ||
160 | ri.magic = cpu_to_je16(JFFS2_MAGIC_BITMASK); | 160 | ri.magic = cpu_to_je16(JFFS2_MAGIC_BITMASK); |
@@ -181,7 +181,7 @@ static int jffs2_write_begin(struct file *filp, struct address_space *mapping, | |||
181 | if (IS_ERR(fn)) { | 181 | if (IS_ERR(fn)) { |
182 | ret = PTR_ERR(fn); | 182 | ret = PTR_ERR(fn); |
183 | jffs2_complete_reservation(c); | 183 | jffs2_complete_reservation(c); |
184 | up(&f->sem); | 184 | mutex_unlock(&f->sem); |
185 | goto out_page; | 185 | goto out_page; |
186 | } | 186 | } |
187 | ret = jffs2_add_full_dnode_to_inode(c, f, fn); | 187 | ret = jffs2_add_full_dnode_to_inode(c, f, fn); |
@@ -195,12 +195,12 @@ static int jffs2_write_begin(struct file *filp, struct address_space *mapping, | |||
195 | jffs2_mark_node_obsolete(c, fn->raw); | 195 | jffs2_mark_node_obsolete(c, fn->raw); |
196 | jffs2_free_full_dnode(fn); | 196 | jffs2_free_full_dnode(fn); |
197 | jffs2_complete_reservation(c); | 197 | jffs2_complete_reservation(c); |
198 | up(&f->sem); | 198 | mutex_unlock(&f->sem); |
199 | goto out_page; | 199 | goto out_page; |
200 | } | 200 | } |
201 | jffs2_complete_reservation(c); | 201 | jffs2_complete_reservation(c); |
202 | inode->i_size = pageofs; | 202 | inode->i_size = pageofs; |
203 | up(&f->sem); | 203 | mutex_unlock(&f->sem); |
204 | } | 204 | } |
205 | 205 | ||
206 | /* | 206 | /* |
@@ -209,9 +209,9 @@ static int jffs2_write_begin(struct file *filp, struct address_space *mapping, | |||
209 | * case of a short-copy. | 209 | * case of a short-copy. |
210 | */ | 210 | */ |
211 | if (!PageUptodate(pg)) { | 211 | if (!PageUptodate(pg)) { |
212 | down(&f->sem); | 212 | mutex_lock(&f->sem); |
213 | ret = jffs2_do_readpage_nolock(inode, pg); | 213 | ret = jffs2_do_readpage_nolock(inode, pg); |
214 | up(&f->sem); | 214 | mutex_unlock(&f->sem); |
215 | if (ret) | 215 | if (ret) |
216 | goto out_page; | 216 | goto out_page; |
217 | } | 217 | } |