VServer 1.9.2 (patch-2.6.8.1-vs1.9.2.diff)
[linux-2.6.git] / fs / hpfs / buffer.c
index 77cd01c..2807aa8 100644 (file)
@@ -31,6 +31,8 @@ void *hpfs_map_sector(struct super_block *s, unsigned secno, struct buffer_head
 {
        struct buffer_head *bh;
 
+       cond_resched();
+
        *bhp = bh = sb_bread(s, secno);
        if (bh != NULL)
                return bh->b_data;
@@ -47,6 +49,8 @@ void *hpfs_get_sector(struct super_block *s, unsigned secno, struct buffer_head
        struct buffer_head *bh;
        /*return hpfs_map_sector(s, secno, bhp, 0);*/
 
+       cond_resched();
+
        if ((*bhp = bh = sb_getblk(s, secno)) != NULL) {
                if (!buffer_uptodate(bh)) wait_on_buffer(bh);
                set_buffer_uptodate(bh);
@@ -65,9 +69,11 @@ void *hpfs_map_4sectors(struct super_block *s, unsigned secno, struct quad_buffe
        struct buffer_head *bh;
        char *data;
 
+       cond_resched();
+
        if (secno & 3) {
                printk("HPFS: hpfs_map_4sectors: unaligned read\n");
-               return 0;
+               return NULL;
        }
 
        qbh->data = data = (char *)kmalloc(2048, GFP_NOFS);
@@ -116,9 +122,11 @@ void *hpfs_map_4sectors(struct super_block *s, unsigned secno, struct quad_buffe
 void *hpfs_get_4sectors(struct super_block *s, unsigned secno,
                           struct quad_buffer_head *qbh)
 {
+       cond_resched();
+
        if (secno & 3) {
                printk("HPFS: hpfs_get_4sectors: unaligned read\n");
-               return 0;
+               return NULL;
        }
 
        /*return hpfs_map_4sectors(s, secno, qbh, 0);*/