linux-old/fs/fat/buffer.c
<<
>>
Prefs
   1/*
   2 * linux/fs/fat/buffer.c
   3 *
   4 *
   5 */
   6
   7#include <linux/mm.h>
   8#include <linux/slab.h>
   9#include <linux/string.h>
  10#include <linux/fs.h>
  11#include <linux/blkdev.h>
  12#include <linux/msdos_fs.h>
  13#include <linux/fat_cvf.h>
  14
  15#if 0
  16#  define PRINTK(x) printk x
  17#else
  18#  define PRINTK(x)
  19#endif
  20
  21struct buffer_head *fat_bread(struct super_block *sb, int block)
  22{
  23        return MSDOS_SB(sb)->cvf_format->cvf_bread(sb,block);
  24}
  25struct buffer_head *fat_getblk(struct super_block *sb, int block)
  26{
  27        return MSDOS_SB(sb)->cvf_format->cvf_getblk(sb,block);
  28}
  29void fat_brelse (struct super_block *sb, struct buffer_head *bh)
  30{
  31        if (bh) 
  32                MSDOS_SB(sb)->cvf_format->cvf_brelse(sb,bh);
  33}
  34void fat_mark_buffer_dirty (
  35        struct super_block *sb,
  36        struct buffer_head *bh)
  37{
  38        MSDOS_SB(sb)->cvf_format->cvf_mark_buffer_dirty(sb,bh);
  39}
  40void fat_set_uptodate (
  41        struct super_block *sb,
  42        struct buffer_head *bh,
  43        int val)
  44{
  45        MSDOS_SB(sb)->cvf_format->cvf_set_uptodate(sb,bh,val);
  46}
  47int fat_is_uptodate(struct super_block *sb, struct buffer_head *bh)
  48{
  49        return MSDOS_SB(sb)->cvf_format->cvf_is_uptodate(sb,bh);
  50}
  51void fat_ll_rw_block (
  52        struct super_block *sb,
  53        int opr,
  54        int nbreq,
  55        struct buffer_head *bh[32])
  56{
  57        MSDOS_SB(sb)->cvf_format->cvf_ll_rw_block(sb,opr,nbreq,bh);
  58}
  59
  60struct buffer_head *default_fat_bread(struct super_block *sb, int block)
  61{
  62        return sb_bread(sb, block);
  63}
  64
  65struct buffer_head *default_fat_getblk(struct super_block *sb, int block)
  66{
  67        return sb_getblk(sb, block);
  68}
  69
  70void default_fat_brelse(struct super_block *sb, struct buffer_head *bh)
  71{
  72        brelse (bh);
  73}
  74
  75void default_fat_mark_buffer_dirty (
  76        struct super_block *sb,
  77        struct buffer_head *bh)
  78{
  79        mark_buffer_dirty (bh);
  80}
  81
  82void default_fat_set_uptodate (
  83        struct super_block *sb,
  84        struct buffer_head *bh,
  85        int val)
  86{
  87        mark_buffer_uptodate(bh, val);
  88}
  89
  90int default_fat_is_uptodate (struct super_block *sb, struct buffer_head *bh)
  91{
  92        return buffer_uptodate(bh);
  93}
  94
  95void default_fat_ll_rw_block (
  96        struct super_block *sb,
  97        int opr,
  98        int nbreq,
  99        struct buffer_head *bh[32])
 100{
 101        ll_rw_block(opr,nbreq,bh);
 102}
 103
lxr.linux.no kindly hosted by Redpill Linpro AS, provider of Linux consulting and operations services since 1995.