tree 1edf9fa6fc996bb873fad59b0019d3a985ded794
parent a42163d7c331c2532551f675d6616a00e1e87fe9
author Artem B. Bityuckiy <[EMAIL PROTECTED]> Sun, 20 Mar 2005 17:46:23 +0000
committer Thomas Gleixner <[EMAIL PROTECTED]> Mon, 23 May 2005 13:02:39 +0200
[JFFS2] Forbid to free inode_cache objects if its nlink isn't zero.
Signed-off-by: Artem B. Bityuckiy <[EMAIL PROTECTED]>
Signed-off-by: Thomas Gleixner <[EMAIL PROTECTED]>
fs/jffs2/erase.c | 4 ++--
fs/jffs2/nodemgmt.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/fs/jffs2/erase.c b/fs/jffs2/erase.c
--- a/fs/jffs2/erase.c
+++ b/fs/jffs2/erase.c
@@ -7,7 +7,7 @@
*
* For licensing information, see the file 'LICENCE' in this directory.
*
- * $Id: erase.c,v 1.72 2005/02/27 23:01:32 dwmw2 Exp $
+ * $Id: erase.c,v 1.74 2005/03/20 17:46:20 dedekind Exp $
*
*/
@@ -277,7 +277,7 @@ static inline void jffs2_remove_node_ref
printk("\n");
});
- if (ic->nodes == (void *)ic)
+ if (ic->nodes == (void *)ic && ic->nlink == 0)
jffs2_del_ino_cache(c, ic);
}
diff --git a/fs/jffs2/nodemgmt.c b/fs/jffs2/nodemgmt.c
--- a/fs/jffs2/nodemgmt.c
+++ b/fs/jffs2/nodemgmt.c
@@ -7,7 +7,7 @@
*
* For licensing information, see the file 'LICENCE' in this directory.
*
- * $Id: nodemgmt.c,v 1.119 2005/02/28 08:21:05 dedekind Exp $
+ * $Id: nodemgmt.c,v 1.120 2005/03/20 17:46:20 dedekind Exp $
*
*/
@@ -594,7 +594,7 @@ void jffs2_mark_node_obsolete(struct jff
*p = ref->next_in_ino;
ref->next_in_ino = NULL;
- if (ic->nodes == (void *)ic)
+ if (ic->nodes == (void *)ic && ic->nlink == 0)
jffs2_del_ino_cache(c, ic);
spin_unlock(&c->erase_completion_lock);
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html