X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=fs%2Fhpfs%2Fbuffer.c;h=2807aa833e62011a42ddeea45e8bc46867907229;hb=9bf4aaab3e101692164d49b7ca357651eb691cb6;hp=77cd01ced013f34c7b0e47bef5ca6d05ba8de8b0;hpb=db216c3d5e4c040e557a50f8f5d35d5c415e8c1c;p=linux-2.6.git diff --git a/fs/hpfs/buffer.c b/fs/hpfs/buffer.c index 77cd01ced..2807aa833 100644 --- a/fs/hpfs/buffer.c +++ b/fs/hpfs/buffer.c @@ -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);*/