Bluetooth: Cancel the Sniff timer
[platform/kernel/linux-starfive.git] / fs / jfs / jfs_dtree.c
index 92b7c53..031d8f5 100644 (file)
@@ -633,6 +633,11 @@ int dtSearch(struct inode *ip, struct component_name * key, ino_t * data,
                for (base = 0, lim = p->header.nextindex; lim; lim >>= 1) {
                        index = base + (lim >> 1);
 
+                       if (stbl[index] < 0) {
+                               rc = -EIO;
+                               goto out;
+                       }
+
                        if (p->header.flag & BT_LEAF) {
                                /* uppercase leaf name to compare */
                                cmp =
@@ -1970,7 +1975,7 @@ static int dtSplitRoot(tid_t tid,
                do {
                        f = &rp->slot[fsi];
                        fsi = f->next;
-               } while (fsi != -1);
+               } while (fsi >= 0);
 
                f->next = n;
        }