Lines Matching defs:inode
2267 struct inode *inode = mapping->host;
2270 if (S_ISBLK(inode->i_mode)) {
2407 struct inode *inode;
2544 inode = mapping->host;
2545 if (S_ISBLK(inode->i_mode)) {
2546 struct block_device *bdev = I_BDEV(inode);
2552 inode_lock(inode);
2553 inode->i_flags &= ~S_SWAPFILE;
2554 inode_unlock(inode);
2673 static int swaps_open(struct inode *inode, struct file *file)
2774 static int claim_swapfile(struct swap_info_struct *p, struct inode *inode)
2778 if (S_ISBLK(inode->i_mode)) {
2779 p->bdev = blkdev_get_by_dev(inode->i_rdev,
2798 } else if (S_ISREG(inode->i_mode)) {
2799 p->bdev = inode->i_sb->s_bdev;
2836 struct inode *inode)
2889 swapfilepages = i_size_read(inode) >> PAGE_SHIFT;
2894 if (swap_header->info.nr_badpages && S_ISREG(inode->i_mode))
3006 struct inode *inode = NULL;
3040 inode = mapping->host;
3042 error = claim_swapfile(p, inode);
3046 inode_lock(inode);
3051 if (IS_SWAPFILE(inode)) {
3070 maxpages = read_swap_header(p, swap_header, inode);
3184 inode->i_flags |= S_SWAPFILE;
3185 error = inode_drain_writes(inode);
3187 inode->i_flags &= ~S_SWAPFILE;
3215 inode_unlock(inode);
3221 if (inode && S_ISBLK(inode->i_mode) && p->bdev) {
3225 inode = NULL;
3245 if (inode)
3246 inode_unlock(inode);