]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
qnx4: di_fname is an array, for crying out loud...
authorAl Viro <viro@zeniv.linux.org.uk>
Thu, 19 Jan 2012 18:19:42 +0000 (13:19 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Thu, 19 Jan 2012 18:19:42 +0000 (13:19 -0500)
(struct qnx4_inode_entry *)(bh->b_data + some_offset)->di_fname
is not going to be NULL, TYVM...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/qnx4/inode.c

index 2bfd987f4853407be1027ede89bc940460346bf8..63e0f7471fb5328fcd57ae55b3116f229e39a8ff 100644 (file)
@@ -194,20 +194,18 @@ static const char *qnx4_checkroot(struct super_block *sb)
                        }
                        for (i = 0; i < QNX4_INODES_PER_BLOCK; i++) {
                                rootdir = (struct qnx4_inode_entry *) (bh->b_data + i * QNX4_DIR_ENTRY_SIZE);
-                               if (rootdir->di_fname != NULL) {
-                                       QNX4DEBUG((KERN_INFO "rootdir entry found : [%s]\n", rootdir->di_fname));
-                                       if (!strcmp(rootdir->di_fname,
-                                                   QNX4_BMNAME)) {
-                                               found = 1;
-                                               qnx4_sb(sb)->BitMap = kmemdup(rootdir,
-                                                                             sizeof(struct qnx4_inode_entry),
-                                                                             GFP_KERNEL);
-                                               if (!qnx4_sb(sb)->BitMap) {
-                                                       brelse (bh);
-                                                       return "not enough memory for bitmap inode";
-                                               }/* keep bitmap inode known */
-                                               break;
-                                       }
+                               QNX4DEBUG((KERN_INFO "rootdir entry found : [%s]\n", rootdir->di_fname));
+                               if (!strcmp(rootdir->di_fname,
+                                           QNX4_BMNAME)) {
+                                       found = 1;
+                                       qnx4_sb(sb)->BitMap = kmemdup(rootdir,
+                                                                     sizeof(struct qnx4_inode_entry),
+                                                                     GFP_KERNEL);
+                                       if (!qnx4_sb(sb)->BitMap) {
+                                               brelse (bh);
+                                               return "not enough memory for bitmap inode";
+                                       }/* keep bitmap inode known */
+                                       break;
                                }
                        }
                        brelse(bh);