# HG changeset patch # User asl # Date 1064312460 0 # Node ID b3c09d540f5635ec711526914f81c3a1d19a1a8b # Parent 5acac6d0ccccacc8e7cc67ed26129f67c81d75ee * src/fs-ecos.c: Do not decrement mount count for unsuccessful umount attempts. diff --git a/packages/fs/jffs2/current/ChangeLog b/packages/fs/jffs2/current/ChangeLog --- a/packages/fs/jffs2/current/ChangeLog +++ b/packages/fs/jffs2/current/ChangeLog @@ -1,3 +1,9 @@ +2003-09-21 Thomas Koeller + Andrew Lunn + + * src/fs-ecos.c: Do not decrement mount count for unsuccessful + umount attempts. + 2003-09-19 Thomas Koeller * src/fs-ecos.c: Another inode number fix. diff --git a/packages/fs/jffs2/current/src/fs-ecos.c b/packages/fs/jffs2/current/src/fs-ecos.c --- a/packages/fs/jffs2/current/src/fs-ecos.c +++ b/packages/fs/jffs2/current/src/fs-ecos.c @@ -584,17 +584,15 @@ static int jffs2_umount(cyg_mtab_entry * D2(printf("jffs2_umount\n")); - // Decrement the mount count - jffs2_sb->s_mount_count--; - // Only really umount if this is the only mount - if (jffs2_sb->s_mount_count == 0) { + if (jffs2_sb->s_mount_count == 1) { // Check for open/inuse root or any cached inodes //if( root->i_count != 1 || root->i_cache_next != NULL) // root icount was set to 1 on mount if (root->i_cache_next != NULL) // root icount was set to 1 on mount return EBUSY; - + + jffs2_sb->s_mount_count--; dec_refcnt(root); // Time to free the root inode //Clear root inode @@ -611,7 +609,8 @@ static int jffs2_umount(cyg_mtab_entry * mte->fs->data = 0; // fstab entry, visible to all mounts. No current mount // That's all folks. D2(printf("jffs2_umount No current mounts\n")); - } + } else + jffs2_sb->s_mount_count--; return ENOERR; }