• Andrew Morton's avatar
    [PATCH] bdev: add I_BDEV() · 8fbd544c
    Andrew Morton authored
    From: viro@parcelfarce.linux.theplanet.co.uk <viro@parcelfarce.linux.theplanet.co.uk>
    
    For bdevfs inodes (ones created along with struct block_device by
    fs/block_dev.c) we have inode->i_bdev equal to &BDEV_I(inode)->bdev (i.e.
    it's at the constant offset from inode).  New helper added for such inodes
    (I_BDEV(inode)).  A bunch of places (mostly in block_dev.c) switched to use
    of that helper.  A bunch of places that used
    
    	file->f_dentry->d_inode->i_bdev->bd_inode
    
    switched to
    
    	file->f_mapping->host
    
    - those expressions are equal whenever the former is valid.
    8fbd544c
loop.c 29 KB