aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-01-19 13:19:42 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2012-01-19 13:19:42 -0500
commit1aab323ea5cd67d2d2572a1f2794978583ff8545 (patch)
tree102dc00a85b084a458e1d27afa8b1dcc0e5a7ce2
parent424a5334a5235c2fbb80090b18a065eeceb51d64 (diff)
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>
-rw-r--r--fs/qnx4/inode.c26
1 files changed, 12 insertions, 14 deletions
diff --git a/fs/qnx4/inode.c b/fs/qnx4/inode.c
index 2bfd987f4853..63e0f7471fb5 100644
--- a/fs/qnx4/inode.c
+++ b/fs/qnx4/inode.c
@@ -194,20 +194,18 @@ static const char *qnx4_checkroot(struct super_block *sb)
194 } 194 }
195 for (i = 0; i < QNX4_INODES_PER_BLOCK; i++) { 195 for (i = 0; i < QNX4_INODES_PER_BLOCK; i++) {
196 rootdir = (struct qnx4_inode_entry *) (bh->b_data + i * QNX4_DIR_ENTRY_SIZE); 196 rootdir = (struct qnx4_inode_entry *) (bh->b_data + i * QNX4_DIR_ENTRY_SIZE);
197 if (rootdir->di_fname != NULL) { 197 QNX4DEBUG((KERN_INFO "rootdir entry found : [%s]\n", rootdir->di_fname));
198 QNX4DEBUG((KERN_INFO "rootdir entry found : [%s]\n", rootdir->di_fname)); 198 if (!strcmp(rootdir->di_fname,
199 if (!strcmp(rootdir->di_fname, 199 QNX4_BMNAME)) {
200 QNX4_BMNAME)) { 200 found = 1;
201 found = 1; 201 qnx4_sb(sb)->BitMap = kmemdup(rootdir,
202 qnx4_sb(sb)->BitMap = kmemdup(rootdir, 202 sizeof(struct qnx4_inode_entry),
203 sizeof(struct qnx4_inode_entry), 203 GFP_KERNEL);
204 GFP_KERNEL); 204 if (!qnx4_sb(sb)->BitMap) {
205 if (!qnx4_sb(sb)->BitMap) { 205 brelse (bh);
206 brelse (bh); 206 return "not enough memory for bitmap inode";
207 return "not enough memory for bitmap inode"; 207 }/* keep bitmap inode known */
208 }/* keep bitmap inode known */ 208 break;
209 break;
210 }
211 } 209 }
212 } 210 }
213 brelse(bh); 211 brelse(bh);