aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jffs2/write.c
diff options
context:
space:
mode:
authorArtem B. Bityuckiy <dedekind@infradead.org>2005-03-01 05:50:52 -0500
committerThomas Gleixner <tglx@mtd.linutronix.de>2005-05-23 06:48:15 -0400
commit32f1a95d505b99b1f01b6aeea36ec3f97245b357 (patch)
tree5da0e8b01362cf6b0cc79f11e5e9b3fd4ad169d6 /fs/jffs2/write.c
parent20a6c211903dce92a0db7f19c221cfa3f2cb4c32 (diff)
[JFFS2] Add symlink caching support.
Signed-off-by: Artem B. Bityuckiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'fs/jffs2/write.c')
-rw-r--r--fs/jffs2/write.c31
1 files changed, 17 insertions, 14 deletions
diff --git a/fs/jffs2/write.c b/fs/jffs2/write.c
index d6b4d55e70e4..f3910dc1c2c8 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.90 2005/01/28 18:53:01 hammache Exp $ 10 * $Id: write.c,v 1.91 2005/03/01 10:34:03 dedekind Exp $
11 * 11 *
12 */ 12 */
13 13
@@ -644,20 +644,23 @@ int jffs2_do_unlink(struct jffs2_sb_info *c, struct jffs2_inode_info *dir_f,
644 644
645 down(&dead_f->sem); 645 down(&dead_f->sem);
646 646
647 while (dead_f->dents) { 647 if (S_ISDIR(OFNI_EDONI_2SFFJ(dead_f)->i_mode)) {
648 /* There can be only deleted ones */ 648 while (dead_f->dents) {
649 fd = dead_f->dents; 649 /* There can be only deleted ones */
650 650 fd = dead_f->dents;
651 dead_f->dents = fd->next; 651
652 652 dead_f->dents = fd->next;
653 if (fd->ino) { 653
654 printk(KERN_WARNING "Deleting inode #%u with active dentry \"%s\"->ino #%u\n", 654 if (fd->ino) {
655 dead_f->inocache->ino, fd->name, fd->ino); 655 printk(KERN_WARNING "Deleting inode #%u with active dentry \"%s\"->ino #%u\n",
656 } else { 656 dead_f->inocache->ino, fd->name, fd->ino);
657 D1(printk(KERN_DEBUG "Removing deletion dirent for \"%s\" from dir ino #%u\n", fd->name, dead_f->inocache->ino)); 657 } else {
658 D1(printk(KERN_DEBUG "Removing deletion dirent for \"%s\" from dir ino #%u\n",
659 fd->name, dead_f->inocache->ino));
660 }
661 jffs2_mark_node_obsolete(c, fd->raw);
662 jffs2_free_full_dirent(fd);
658 } 663 }
659 jffs2_mark_node_obsolete(c, fd->raw);
660 jffs2_free_full_dirent(fd);
661 } 664 }
662 665
663 dead_f->inocache->nlink--; 666 dead_f->inocache->nlink--;