ubifs: Only check replay with inode type to judge if inode linked
[linux-2.6-microblaze.git] / fs / ubifs / replay.c
index 0f8a6a1..1929ec6 100644 (file)
@@ -223,7 +223,8 @@ static bool inode_still_linked(struct ubifs_info *c, struct replay_entry *rino)
         */
        list_for_each_entry_reverse(r, &c->replay_list, list) {
                ubifs_assert(c, r->sqnum >= rino->sqnum);
-               if (key_inum(c, &r->key) == key_inum(c, &rino->key))
+               if (key_inum(c, &r->key) == key_inum(c, &rino->key) &&
+                   key_type(c, &r->key) == UBIFS_INO_KEY)
                        return r->deletion == 0;
 
        }