diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2005-11-07 06:16:07 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@mtd.linutronix.de> | 2005-11-07 08:18:56 -0500 |
commit | 182ec4eee397543101a6db8906ed88727d3f7e53 (patch) | |
tree | 0f6dd2c52697123702bdf0c3a7143537f947b060 /fs/jffs2/write.c | |
parent | 97894cda5773e59bd13e87b72077751099419a9f (diff) |
[JFFS2] Clean up trailing white spaces
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'fs/jffs2/write.c')
-rw-r--r-- | fs/jffs2/write.c | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/fs/jffs2/write.c b/fs/jffs2/write.c index ea411518d801..1342f0158e9b 100644 --- a/fs/jffs2/write.c +++ b/fs/jffs2/write.c | |||
@@ -7,7 +7,7 @@ | |||
7 | * | 7 | * |
8 | * For licensing information, see the file 'LICENCE' in this directory. | 8 | * For licensing information, see the file 'LICENCE' in this directory. |
9 | * | 9 | * |
10 | * $Id: write.c,v 1.96 2005/09/07 08:34:55 havasi Exp $ | 10 | * $Id: write.c,v 1.97 2005/11/07 11:14:42 gleixner Exp $ |
11 | * | 11 | * |
12 | */ | 12 | */ |
13 | 13 | ||
@@ -54,7 +54,7 @@ int jffs2_do_new_inode(struct jffs2_sb_info *c, struct jffs2_inode_info *f, uint | |||
54 | return 0; | 54 | return 0; |
55 | } | 55 | } |
56 | 56 | ||
57 | /* jffs2_write_dnode - given a raw_inode, allocate a full_dnode for it, | 57 | /* jffs2_write_dnode - given a raw_inode, allocate a full_dnode for it, |
58 | write it to the flash, link it into the existing inode/fragment list */ | 58 | write it to the flash, link it into the existing inode/fragment list */ |
59 | 59 | ||
60 | struct jffs2_full_dnode *jffs2_write_dnode(struct jffs2_sb_info *c, struct jffs2_inode_info *f, struct jffs2_raw_inode *ri, const unsigned char *data, uint32_t datalen, uint32_t flash_ofs, int alloc_mode) | 60 | struct jffs2_full_dnode *jffs2_write_dnode(struct jffs2_sb_info *c, struct jffs2_inode_info *f, struct jffs2_raw_inode *ri, const unsigned char *data, uint32_t datalen, uint32_t flash_ofs, int alloc_mode) |
@@ -86,7 +86,7 @@ struct jffs2_full_dnode *jffs2_write_dnode(struct jffs2_sb_info *c, struct jffs2 | |||
86 | raw = jffs2_alloc_raw_node_ref(); | 86 | raw = jffs2_alloc_raw_node_ref(); |
87 | if (!raw) | 87 | if (!raw) |
88 | return ERR_PTR(-ENOMEM); | 88 | return ERR_PTR(-ENOMEM); |
89 | 89 | ||
90 | fn = jffs2_alloc_full_dnode(); | 90 | fn = jffs2_alloc_full_dnode(); |
91 | if (!fn) { | 91 | if (!fn) { |
92 | jffs2_free_raw_node_ref(raw); | 92 | jffs2_free_raw_node_ref(raw); |
@@ -110,7 +110,7 @@ struct jffs2_full_dnode *jffs2_write_dnode(struct jffs2_sb_info *c, struct jffs2 | |||
110 | if ((alloc_mode!=ALLOC_GC) && (je32_to_cpu(ri->version) < f->highest_version)) { | 110 | if ((alloc_mode!=ALLOC_GC) && (je32_to_cpu(ri->version) < f->highest_version)) { |
111 | BUG_ON(!retried); | 111 | BUG_ON(!retried); |
112 | D1(printk(KERN_DEBUG "jffs2_write_dnode : dnode_version %d, " | 112 | D1(printk(KERN_DEBUG "jffs2_write_dnode : dnode_version %d, " |
113 | "highest version %d -> updating dnode\n", | 113 | "highest version %d -> updating dnode\n", |
114 | je32_to_cpu(ri->version), f->highest_version)); | 114 | je32_to_cpu(ri->version), f->highest_version)); |
115 | ri->version = cpu_to_je32(++f->highest_version); | 115 | ri->version = cpu_to_je32(++f->highest_version); |
116 | ri->node_crc = cpu_to_je32(crc32(0, ri, sizeof(*ri)-8)); | 116 | ri->node_crc = cpu_to_je32(crc32(0, ri, sizeof(*ri)-8)); |
@@ -120,7 +120,7 @@ struct jffs2_full_dnode *jffs2_write_dnode(struct jffs2_sb_info *c, struct jffs2 | |||
120 | (alloc_mode==ALLOC_GC)?0:f->inocache->ino); | 120 | (alloc_mode==ALLOC_GC)?0:f->inocache->ino); |
121 | 121 | ||
122 | if (ret || (retlen != sizeof(*ri) + datalen)) { | 122 | if (ret || (retlen != sizeof(*ri) + datalen)) { |
123 | printk(KERN_NOTICE "Write of %zd bytes at 0x%08x failed. returned %d, retlen %zd\n", | 123 | printk(KERN_NOTICE "Write of %zd bytes at 0x%08x failed. returned %d, retlen %zd\n", |
124 | sizeof(*ri)+datalen, flash_ofs, ret, retlen); | 124 | sizeof(*ri)+datalen, flash_ofs, ret, retlen); |
125 | 125 | ||
126 | /* Mark the space as dirtied */ | 126 | /* Mark the space as dirtied */ |
@@ -128,10 +128,10 @@ struct jffs2_full_dnode *jffs2_write_dnode(struct jffs2_sb_info *c, struct jffs2 | |||
128 | /* Doesn't belong to any inode */ | 128 | /* Doesn't belong to any inode */ |
129 | raw->next_in_ino = NULL; | 129 | raw->next_in_ino = NULL; |
130 | 130 | ||
131 | /* Don't change raw->size to match retlen. We may have | 131 | /* Don't change raw->size to match retlen. We may have |
132 | written the node header already, and only the data will | 132 | written the node header already, and only the data will |
133 | seem corrupted, in which case the scan would skip over | 133 | seem corrupted, in which case the scan would skip over |
134 | any node we write before the original intended end of | 134 | any node we write before the original intended end of |
135 | this node */ | 135 | this node */ |
136 | raw->flash_offset |= REF_OBSOLETE; | 136 | raw->flash_offset |= REF_OBSOLETE; |
137 | jffs2_add_physical_node_ref(c, raw); | 137 | jffs2_add_physical_node_ref(c, raw); |
@@ -148,7 +148,7 @@ struct jffs2_full_dnode *jffs2_write_dnode(struct jffs2_sb_info *c, struct jffs2 | |||
148 | retried = 1; | 148 | retried = 1; |
149 | 149 | ||
150 | D1(printk(KERN_DEBUG "Retrying failed write.\n")); | 150 | D1(printk(KERN_DEBUG "Retrying failed write.\n")); |
151 | 151 | ||
152 | jffs2_dbg_acct_sanity_check(c,jeb); | 152 | jffs2_dbg_acct_sanity_check(c,jeb); |
153 | jffs2_dbg_acct_paranoia_check(c, jeb); | 153 | jffs2_dbg_acct_paranoia_check(c, jeb); |
154 | 154 | ||
@@ -159,7 +159,7 @@ struct jffs2_full_dnode *jffs2_write_dnode(struct jffs2_sb_info *c, struct jffs2 | |||
159 | /* Locking pain */ | 159 | /* Locking pain */ |
160 | up(&f->sem); | 160 | up(&f->sem); |
161 | jffs2_complete_reservation(c); | 161 | jffs2_complete_reservation(c); |
162 | 162 | ||
163 | ret = jffs2_reserve_space(c, sizeof(*ri) + datalen, &flash_ofs, | 163 | ret = jffs2_reserve_space(c, sizeof(*ri) + datalen, &flash_ofs, |
164 | &dummy, alloc_mode, JFFS2_SUMMARY_INODE_SIZE); | 164 | &dummy, alloc_mode, JFFS2_SUMMARY_INODE_SIZE); |
165 | down(&f->sem); | 165 | down(&f->sem); |
@@ -181,9 +181,9 @@ struct jffs2_full_dnode *jffs2_write_dnode(struct jffs2_sb_info *c, struct jffs2 | |||
181 | return ERR_PTR(ret?ret:-EIO); | 181 | return ERR_PTR(ret?ret:-EIO); |
182 | } | 182 | } |
183 | /* Mark the space used */ | 183 | /* Mark the space used */ |
184 | /* If node covers at least a whole page, or if it starts at the | 184 | /* If node covers at least a whole page, or if it starts at the |
185 | beginning of a page and runs to the end of the file, or if | 185 | beginning of a page and runs to the end of the file, or if |
186 | it's a hole node, mark it REF_PRISTINE, else REF_NORMAL. | 186 | it's a hole node, mark it REF_PRISTINE, else REF_NORMAL. |
187 | */ | 187 | */ |
188 | if ((je32_to_cpu(ri->dsize) >= PAGE_CACHE_SIZE) || | 188 | if ((je32_to_cpu(ri->dsize) >= PAGE_CACHE_SIZE) || |
189 | ( ((je32_to_cpu(ri->offset)&(PAGE_CACHE_SIZE-1))==0) && | 189 | ( ((je32_to_cpu(ri->offset)&(PAGE_CACHE_SIZE-1))==0) && |
@@ -201,7 +201,7 @@ struct jffs2_full_dnode *jffs2_write_dnode(struct jffs2_sb_info *c, struct jffs2 | |||
201 | spin_unlock(&c->erase_completion_lock); | 201 | spin_unlock(&c->erase_completion_lock); |
202 | 202 | ||
203 | D1(printk(KERN_DEBUG "jffs2_write_dnode wrote node at 0x%08x(%d) with dsize 0x%x, csize 0x%x, node_crc 0x%08x, data_crc 0x%08x, totlen 0x%08x\n", | 203 | D1(printk(KERN_DEBUG "jffs2_write_dnode wrote node at 0x%08x(%d) with dsize 0x%x, csize 0x%x, node_crc 0x%08x, data_crc 0x%08x, totlen 0x%08x\n", |
204 | flash_ofs, ref_flags(raw), je32_to_cpu(ri->dsize), | 204 | flash_ofs, ref_flags(raw), je32_to_cpu(ri->dsize), |
205 | je32_to_cpu(ri->csize), je32_to_cpu(ri->node_crc), | 205 | je32_to_cpu(ri->csize), je32_to_cpu(ri->node_crc), |
206 | je32_to_cpu(ri->data_crc), je32_to_cpu(ri->totlen))); | 206 | je32_to_cpu(ri->data_crc), je32_to_cpu(ri->totlen))); |
207 | 207 | ||
@@ -221,7 +221,7 @@ struct jffs2_full_dirent *jffs2_write_dirent(struct jffs2_sb_info *c, struct jff | |||
221 | int retried = 0; | 221 | int retried = 0; |
222 | int ret; | 222 | int ret; |
223 | 223 | ||
224 | D1(printk(KERN_DEBUG "jffs2_write_dirent(ino #%u, name at *0x%p \"%s\"->ino #%u, name_crc 0x%08x)\n", | 224 | D1(printk(KERN_DEBUG "jffs2_write_dirent(ino #%u, name at *0x%p \"%s\"->ino #%u, name_crc 0x%08x)\n", |
225 | je32_to_cpu(rd->pino), name, name, je32_to_cpu(rd->ino), | 225 | je32_to_cpu(rd->pino), name, name, je32_to_cpu(rd->ino), |
226 | je32_to_cpu(rd->name_crc))); | 226 | je32_to_cpu(rd->name_crc))); |
227 | 227 | ||
@@ -235,7 +235,7 @@ struct jffs2_full_dirent *jffs2_write_dirent(struct jffs2_sb_info *c, struct jff | |||
235 | vecs[0].iov_len = sizeof(*rd); | 235 | vecs[0].iov_len = sizeof(*rd); |
236 | vecs[1].iov_base = (unsigned char *)name; | 236 | vecs[1].iov_base = (unsigned char *)name; |
237 | vecs[1].iov_len = namelen; | 237 | vecs[1].iov_len = namelen; |
238 | 238 | ||
239 | jffs2_dbg_prewrite_paranoia_check(c, flash_ofs, vecs[0].iov_len + vecs[1].iov_len); | 239 | jffs2_dbg_prewrite_paranoia_check(c, flash_ofs, vecs[0].iov_len + vecs[1].iov_len); |
240 | 240 | ||
241 | raw = jffs2_alloc_raw_node_ref(); | 241 | raw = jffs2_alloc_raw_node_ref(); |
@@ -276,7 +276,7 @@ struct jffs2_full_dirent *jffs2_write_dirent(struct jffs2_sb_info *c, struct jff | |||
276 | ret = jffs2_flash_writev(c, vecs, 2, flash_ofs, &retlen, | 276 | ret = jffs2_flash_writev(c, vecs, 2, flash_ofs, &retlen, |
277 | (alloc_mode==ALLOC_GC)?0:je32_to_cpu(rd->pino)); | 277 | (alloc_mode==ALLOC_GC)?0:je32_to_cpu(rd->pino)); |
278 | if (ret || (retlen != sizeof(*rd) + namelen)) { | 278 | if (ret || (retlen != sizeof(*rd) + namelen)) { |
279 | printk(KERN_NOTICE "Write of %zd bytes at 0x%08x failed. returned %d, retlen %zd\n", | 279 | printk(KERN_NOTICE "Write of %zd bytes at 0x%08x failed. returned %d, retlen %zd\n", |
280 | sizeof(*rd)+namelen, flash_ofs, ret, retlen); | 280 | sizeof(*rd)+namelen, flash_ofs, ret, retlen); |
281 | /* Mark the space as dirtied */ | 281 | /* Mark the space as dirtied */ |
282 | if (retlen) { | 282 | if (retlen) { |
@@ -307,7 +307,7 @@ struct jffs2_full_dirent *jffs2_write_dirent(struct jffs2_sb_info *c, struct jff | |||
307 | /* Locking pain */ | 307 | /* Locking pain */ |
308 | up(&f->sem); | 308 | up(&f->sem); |
309 | jffs2_complete_reservation(c); | 309 | jffs2_complete_reservation(c); |
310 | 310 | ||
311 | ret = jffs2_reserve_space(c, sizeof(*rd) + namelen, &flash_ofs, | 311 | ret = jffs2_reserve_space(c, sizeof(*rd) + namelen, &flash_ofs, |
312 | &dummy, alloc_mode, JFFS2_SUMMARY_DIRENT_SIZE(namelen)); | 312 | &dummy, alloc_mode, JFFS2_SUMMARY_DIRENT_SIZE(namelen)); |
313 | down(&f->sem); | 313 | down(&f->sem); |
@@ -346,7 +346,7 @@ struct jffs2_full_dirent *jffs2_write_dirent(struct jffs2_sb_info *c, struct jff | |||
346 | we don't have to go digging in struct inode or its equivalent. It should set: | 346 | we don't have to go digging in struct inode or its equivalent. It should set: |
347 | mode, uid, gid, (starting)isize, atime, ctime, mtime */ | 347 | mode, uid, gid, (starting)isize, atime, ctime, mtime */ |
348 | int jffs2_write_inode_range(struct jffs2_sb_info *c, struct jffs2_inode_info *f, | 348 | int jffs2_write_inode_range(struct jffs2_sb_info *c, struct jffs2_inode_info *f, |
349 | struct jffs2_raw_inode *ri, unsigned char *buf, | 349 | struct jffs2_raw_inode *ri, unsigned char *buf, |
350 | uint32_t offset, uint32_t writelen, uint32_t *retlen) | 350 | uint32_t offset, uint32_t writelen, uint32_t *retlen) |
351 | { | 351 | { |
352 | int ret = 0; | 352 | int ret = 0; |
@@ -354,7 +354,7 @@ int jffs2_write_inode_range(struct jffs2_sb_info *c, struct jffs2_inode_info *f, | |||
354 | 354 | ||
355 | D1(printk(KERN_DEBUG "jffs2_write_inode_range(): Ino #%u, ofs 0x%x, len 0x%x\n", | 355 | D1(printk(KERN_DEBUG "jffs2_write_inode_range(): Ino #%u, ofs 0x%x, len 0x%x\n", |
356 | f->inocache->ino, offset, writelen)); | 356 | f->inocache->ino, offset, writelen)); |
357 | 357 | ||
358 | while(writelen) { | 358 | while(writelen) { |
359 | struct jffs2_full_dnode *fn; | 359 | struct jffs2_full_dnode *fn; |
360 | unsigned char *comprbuf = NULL; | 360 | unsigned char *comprbuf = NULL; |
@@ -451,8 +451,8 @@ int jffs2_do_create(struct jffs2_sb_info *c, struct jffs2_inode_info *dir_f, str | |||
451 | uint32_t alloclen, phys_ofs; | 451 | uint32_t alloclen, phys_ofs; |
452 | int ret; | 452 | int ret; |
453 | 453 | ||
454 | /* Try to reserve enough space for both node and dirent. | 454 | /* Try to reserve enough space for both node and dirent. |
455 | * Just the node will do for now, though | 455 | * Just the node will do for now, though |
456 | */ | 456 | */ |
457 | ret = jffs2_reserve_space(c, sizeof(*ri), &phys_ofs, &alloclen, ALLOC_NORMAL, | 457 | ret = jffs2_reserve_space(c, sizeof(*ri), &phys_ofs, &alloclen, ALLOC_NORMAL, |
458 | JFFS2_SUMMARY_INODE_SIZE); | 458 | JFFS2_SUMMARY_INODE_SIZE); |
@@ -477,7 +477,7 @@ int jffs2_do_create(struct jffs2_sb_info *c, struct jffs2_inode_info *dir_f, str | |||
477 | jffs2_complete_reservation(c); | 477 | jffs2_complete_reservation(c); |
478 | return PTR_ERR(fn); | 478 | return PTR_ERR(fn); |
479 | } | 479 | } |
480 | /* No data here. Only a metadata node, which will be | 480 | /* No data here. Only a metadata node, which will be |
481 | obsoleted by the first data write | 481 | obsoleted by the first data write |
482 | */ | 482 | */ |
483 | f->metadata = fn; | 483 | f->metadata = fn; |
@@ -486,7 +486,7 @@ int jffs2_do_create(struct jffs2_sb_info *c, struct jffs2_inode_info *dir_f, str | |||
486 | jffs2_complete_reservation(c); | 486 | jffs2_complete_reservation(c); |
487 | ret = jffs2_reserve_space(c, sizeof(*rd)+namelen, &phys_ofs, &alloclen, | 487 | ret = jffs2_reserve_space(c, sizeof(*rd)+namelen, &phys_ofs, &alloclen, |
488 | ALLOC_NORMAL, JFFS2_SUMMARY_DIRENT_SIZE(namelen)); | 488 | ALLOC_NORMAL, JFFS2_SUMMARY_DIRENT_SIZE(namelen)); |
489 | 489 | ||
490 | if (ret) { | 490 | if (ret) { |
491 | /* Eep. */ | 491 | /* Eep. */ |
492 | D1(printk(KERN_DEBUG "jffs2_reserve_space() for dirent failed\n")); | 492 | D1(printk(KERN_DEBUG "jffs2_reserve_space() for dirent failed\n")); |
@@ -519,9 +519,9 @@ int jffs2_do_create(struct jffs2_sb_info *c, struct jffs2_inode_info *dir_f, str | |||
519 | fd = jffs2_write_dirent(c, dir_f, rd, name, namelen, phys_ofs, ALLOC_NORMAL); | 519 | fd = jffs2_write_dirent(c, dir_f, rd, name, namelen, phys_ofs, ALLOC_NORMAL); |
520 | 520 | ||
521 | jffs2_free_raw_dirent(rd); | 521 | jffs2_free_raw_dirent(rd); |
522 | 522 | ||
523 | if (IS_ERR(fd)) { | 523 | if (IS_ERR(fd)) { |
524 | /* dirent failed to write. Delete the inode normally | 524 | /* dirent failed to write. Delete the inode normally |
525 | as if it were the final unlink() */ | 525 | as if it were the final unlink() */ |
526 | jffs2_complete_reservation(c); | 526 | jffs2_complete_reservation(c); |
527 | up(&dir_f->sem); | 527 | up(&dir_f->sem); |
@@ -548,7 +548,7 @@ int jffs2_do_unlink(struct jffs2_sb_info *c, struct jffs2_inode_info *dir_f, | |||
548 | uint32_t alloclen, phys_ofs; | 548 | uint32_t alloclen, phys_ofs; |
549 | int ret; | 549 | int ret; |
550 | 550 | ||
551 | if (1 /* alternative branch needs testing */ || | 551 | if (1 /* alternative branch needs testing */ || |
552 | !jffs2_can_mark_obsolete(c)) { | 552 | !jffs2_can_mark_obsolete(c)) { |
553 | /* We can't mark stuff obsolete on the medium. We need to write a deletion dirent */ | 553 | /* We can't mark stuff obsolete on the medium. We need to write a deletion dirent */ |
554 | 554 | ||
@@ -570,7 +570,7 @@ int jffs2_do_unlink(struct jffs2_sb_info *c, struct jffs2_inode_info *dir_f, | |||
570 | rd->nodetype = cpu_to_je16(JFFS2_NODETYPE_DIRENT); | 570 | rd->nodetype = cpu_to_je16(JFFS2_NODETYPE_DIRENT); |
571 | rd->totlen = cpu_to_je32(sizeof(*rd) + namelen); | 571 | rd->totlen = cpu_to_je32(sizeof(*rd) + namelen); |
572 | rd->hdr_crc = cpu_to_je32(crc32(0, rd, sizeof(struct jffs2_unknown_node)-4)); | 572 | rd->hdr_crc = cpu_to_je32(crc32(0, rd, sizeof(struct jffs2_unknown_node)-4)); |
573 | 573 | ||
574 | rd->pino = cpu_to_je32(dir_f->inocache->ino); | 574 | rd->pino = cpu_to_je32(dir_f->inocache->ino); |
575 | rd->version = cpu_to_je32(++dir_f->highest_version); | 575 | rd->version = cpu_to_je32(++dir_f->highest_version); |
576 | rd->ino = cpu_to_je32(0); | 576 | rd->ino = cpu_to_je32(0); |
@@ -581,7 +581,7 @@ int jffs2_do_unlink(struct jffs2_sb_info *c, struct jffs2_inode_info *dir_f, | |||
581 | rd->name_crc = cpu_to_je32(crc32(0, name, namelen)); | 581 | rd->name_crc = cpu_to_je32(crc32(0, name, namelen)); |
582 | 582 | ||
583 | fd = jffs2_write_dirent(c, dir_f, rd, name, namelen, phys_ofs, ALLOC_DELETION); | 583 | fd = jffs2_write_dirent(c, dir_f, rd, name, namelen, phys_ofs, ALLOC_DELETION); |
584 | 584 | ||
585 | jffs2_free_raw_dirent(rd); | 585 | jffs2_free_raw_dirent(rd); |
586 | 586 | ||
587 | if (IS_ERR(fd)) { | 587 | if (IS_ERR(fd)) { |
@@ -600,7 +600,7 @@ int jffs2_do_unlink(struct jffs2_sb_info *c, struct jffs2_inode_info *dir_f, | |||
600 | down(&dir_f->sem); | 600 | down(&dir_f->sem); |
601 | 601 | ||
602 | while ((*prev) && (*prev)->nhash <= nhash) { | 602 | while ((*prev) && (*prev)->nhash <= nhash) { |
603 | if ((*prev)->nhash == nhash && | 603 | if ((*prev)->nhash == nhash && |
604 | !memcmp((*prev)->name, name, namelen) && | 604 | !memcmp((*prev)->name, name, namelen) && |
605 | !(*prev)->name[namelen]) { | 605 | !(*prev)->name[namelen]) { |
606 | struct jffs2_full_dirent *this = *prev; | 606 | struct jffs2_full_dirent *this = *prev; |
@@ -621,7 +621,7 @@ int jffs2_do_unlink(struct jffs2_sb_info *c, struct jffs2_inode_info *dir_f, | |||
621 | /* dead_f is NULL if this was a rename not a real unlink */ | 621 | /* dead_f is NULL if this was a rename not a real unlink */ |
622 | /* Also catch the !f->inocache case, where there was a dirent | 622 | /* Also catch the !f->inocache case, where there was a dirent |
623 | pointing to an inode which didn't exist. */ | 623 | pointing to an inode which didn't exist. */ |
624 | if (dead_f && dead_f->inocache) { | 624 | if (dead_f && dead_f->inocache) { |
625 | 625 | ||
626 | down(&dead_f->sem); | 626 | down(&dead_f->sem); |
627 | 627 | ||
@@ -629,9 +629,9 @@ int jffs2_do_unlink(struct jffs2_sb_info *c, struct jffs2_inode_info *dir_f, | |||
629 | while (dead_f->dents) { | 629 | while (dead_f->dents) { |
630 | /* There can be only deleted ones */ | 630 | /* There can be only deleted ones */ |
631 | fd = dead_f->dents; | 631 | fd = dead_f->dents; |
632 | 632 | ||
633 | dead_f->dents = fd->next; | 633 | dead_f->dents = fd->next; |
634 | 634 | ||
635 | if (fd->ino) { | 635 | if (fd->ino) { |
636 | printk(KERN_WARNING "Deleting inode #%u with active dentry \"%s\"->ino #%u\n", | 636 | printk(KERN_WARNING "Deleting inode #%u with active dentry \"%s\"->ino #%u\n", |
637 | dead_f->inocache->ino, fd->name, fd->ino); | 637 | dead_f->inocache->ino, fd->name, fd->ino); |
@@ -672,7 +672,7 @@ int jffs2_do_link (struct jffs2_sb_info *c, struct jffs2_inode_info *dir_f, uint | |||
672 | jffs2_free_raw_dirent(rd); | 672 | jffs2_free_raw_dirent(rd); |
673 | return ret; | 673 | return ret; |
674 | } | 674 | } |
675 | 675 | ||
676 | down(&dir_f->sem); | 676 | down(&dir_f->sem); |
677 | 677 | ||
678 | /* Build a deletion node */ | 678 | /* Build a deletion node */ |
@@ -693,7 +693,7 @@ int jffs2_do_link (struct jffs2_sb_info *c, struct jffs2_inode_info *dir_f, uint | |||
693 | rd->name_crc = cpu_to_je32(crc32(0, name, namelen)); | 693 | rd->name_crc = cpu_to_je32(crc32(0, name, namelen)); |
694 | 694 | ||
695 | fd = jffs2_write_dirent(c, dir_f, rd, name, namelen, phys_ofs, ALLOC_NORMAL); | 695 | fd = jffs2_write_dirent(c, dir_f, rd, name, namelen, phys_ofs, ALLOC_NORMAL); |
696 | 696 | ||
697 | jffs2_free_raw_dirent(rd); | 697 | jffs2_free_raw_dirent(rd); |
698 | 698 | ||
699 | if (IS_ERR(fd)) { | 699 | if (IS_ERR(fd)) { |