diff options
| author | Andrew Morton <akpm@osdl.org> | 2004-01-18 18:07:17 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.osdl.org> | 2004-01-18 18:07:17 -0800 |
| commit | 8fbd544cbca5c62947daa5b270a4d083b9c93289 (patch) | |
| tree | 524518743b4362ed6f116248df210a437c15b692 /include/linux | |
| parent | 980f718652f064f33a139a2b69d15df510d53e4a (diff) | |
[PATCH] bdev: add I_BDEV()
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.
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/fs.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index 2880d702043e..8863f93617ba 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -480,6 +480,8 @@ static inline unsigned imajor(struct inode *inode) return MAJOR(inode->i_rdev); } +extern struct block_device *I_BDEV(struct inode *inode); + struct fown_struct { rwlock_t lock; /* protects pid, uid, euid fields */ int pid; /* pid or -pgrp where SIGIO should be sent */ @@ -1128,7 +1130,6 @@ extern struct block_device *bdget(dev_t); extern void bd_forget(struct inode *inode); extern void bdput(struct block_device *); extern int blkdev_open(struct inode *, struct file *); -extern int blkdev_close(struct inode *, struct file *); extern struct block_device *open_by_devnum(dev_t, unsigned, int); extern struct file_operations def_blk_fops; extern struct address_space_operations def_blk_aops; |
