Merge branch 'akpm' (patches from Andrew)
[linux-2.6-microblaze.git] / fs / hfs / inode.c
index 4a95a92..2a51432 100644 (file)
@@ -462,8 +462,7 @@ int hfs_write_inode(struct inode *inode, struct writeback_control *wbc)
                goto out;
 
        if (S_ISDIR(main_inode->i_mode)) {
-               if (fd.entrylength < sizeof(struct hfs_cat_dir))
-                       /* panic? */;
+               WARN_ON(fd.entrylength < sizeof(struct hfs_cat_dir));
                hfs_bnode_read(fd.bnode, &rec, fd.entryoffset,
                           sizeof(struct hfs_cat_dir));
                if (rec.type != HFS_CDR_DIR ||
@@ -483,8 +482,7 @@ int hfs_write_inode(struct inode *inode, struct writeback_control *wbc)
                hfs_bnode_write(fd.bnode, &rec, fd.entryoffset,
                                sizeof(struct hfs_cat_file));
        } else {
-               if (fd.entrylength < sizeof(struct hfs_cat_file))
-                       /* panic? */;
+               WARN_ON(fd.entrylength < sizeof(struct hfs_cat_file));
                hfs_bnode_read(fd.bnode, &rec, fd.entryoffset,
                           sizeof(struct hfs_cat_file));
                if (rec.type != HFS_CDR_FIL ||