hfsplus: fix return value of hfsplus_get_block()
[linux-2.6-block.git] / fs / hfsplus / extents.c
index 8a8893d522ef351af411a57daf2968f4b3c97879..a930ddd156819caf54635655382d27ab5998fab9 100644 (file)
@@ -237,7 +237,9 @@ int hfsplus_get_block(struct inode *inode, sector_t iblock,
        ablock = iblock >> sbi->fs_shift;
 
        if (iblock >= hip->fs_blocks) {
-               if (iblock > hip->fs_blocks || !create)
+               if (!create)
+                       return 0;
+               if (iblock > hip->fs_blocks)
                        return -EIO;
                if (ablock >= hip->alloc_blocks) {
                        res = hfsplus_file_extend(inode, false);