qnx4: di_fname is an array, for crying out loud...
(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>
This commit is contained in:
parent
424a5334a5
commit
1aab323ea5
@ -194,20 +194,18 @@ static const char *qnx4_checkroot(struct super_block *sb)
|
|||||||
}
|
}
|
||||||
for (i = 0; i < QNX4_INODES_PER_BLOCK; i++) {
|
for (i = 0; i < QNX4_INODES_PER_BLOCK; i++) {
|
||||||
rootdir = (struct qnx4_inode_entry *) (bh->b_data + i * QNX4_DIR_ENTRY_SIZE);
|
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));
|
||||||
QNX4DEBUG((KERN_INFO "rootdir entry found : [%s]\n", rootdir->di_fname));
|
if (!strcmp(rootdir->di_fname,
|
||||||
if (!strcmp(rootdir->di_fname,
|
QNX4_BMNAME)) {
|
||||||
QNX4_BMNAME)) {
|
found = 1;
|
||||||
found = 1;
|
qnx4_sb(sb)->BitMap = kmemdup(rootdir,
|
||||||
qnx4_sb(sb)->BitMap = kmemdup(rootdir,
|
sizeof(struct qnx4_inode_entry),
|
||||||
sizeof(struct qnx4_inode_entry),
|
GFP_KERNEL);
|
||||||
GFP_KERNEL);
|
if (!qnx4_sb(sb)->BitMap) {
|
||||||
if (!qnx4_sb(sb)->BitMap) {
|
brelse (bh);
|
||||||
brelse (bh);
|
return "not enough memory for bitmap inode";
|
||||||
return "not enough memory for bitmap inode";
|
}/* keep bitmap inode known */
|
||||||
}/* keep bitmap inode known */
|
break;
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
brelse(bh);
|
brelse(bh);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user