diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-25 15:25:48 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-25 15:25:48 -0400 |
commit | 7e97b28309edc5669ced2bb1371704e8f8d084e3 (patch) | |
tree | 9605694b00b4233a730ad86ea6d395cf59efc905 /fs/jffs2/file.c | |
parent | 5421d059068341b3f21df1a21c2ba9175e55ebef (diff) | |
parent | 3887ed5231fb6f339f36c3a0297c996cd1a1dad9 (diff) |
Merge git://git.infradead.org/mtd-2.6
* git://git.infradead.org/mtd-2.6: (82 commits)
[MTD] m25p80: Add Support for ATMEL AT25DF641 64-Megabit SPI Flash
[MTD] m25p80: add FAST_READ access support to M25Pxx
[MTD] [NAND] bf5xx_nand: Avoid crash if bfin_mac is installed.
[MTD] [NAND] at91_nand: control NCE signal
[MTD] [NAND] AT91 hardware ECC compile fix for at91sam9263 / at91sam9260
[MTD] [NAND] Hardware ECC controller on at91sam9263 / at91sam9260
[JFFS2] Introduce dbg_readinode2 log level, use it to shut read_dnode() up
[JFFS2] Fix jffs2_reserve_space() when all blocks are pending erasure.
[JFFS2] Add erase_checking_list to hold blocks being marked.
UBI: add a message
[JFFS2] Return values of jffs2_block_check_erase error paths
[MTD] Clean up AR7 partition map support
[MTD] [NOR] Fix Intel CFI driver for collie flash
[JFFS2] Finally remove redundant ref->__totlen field.
[JFFS2] Honour TEST_TOTLEN macro in debugging code. ref->__totlen is going!
[JFFS2] Add paranoia debugging for superblock counts
[JFFS2] Fix free space leak with in-band cleanmarkers
[JFFS2] Self-sufficient #includes in jffs2_fs_i.h: include <linux/mutex.h>
[MTD] [NAND] Verify probe by retrying to checking the results match
[MTD] [NAND] S3C2410 Allow ECC disable to be specified by the board
...
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 | } |