Lines Matching defs:inode
2448 struct inode *inode = mapping->host;
2451 if (S_ISBLK(inode->i_mode)) {
2586 struct inode *inode;
2726 inode = mapping->host;
2727 if (S_ISBLK(inode->i_mode)) {
2728 struct block_device *bdev = I_BDEV(inode);
2734 inode_lock(inode);
2735 inode->i_flags &= ~S_SWAPFILE;
2736 inode_unlock(inode);
2855 static int swaps_open(struct inode *inode, struct file *file)
2947 static int claim_swapfile(struct swap_info_struct *p, struct inode *inode)
2951 if (S_ISBLK(inode->i_mode)) {
2952 p->bdev = blkdev_get_by_dev(inode->i_rdev,
2971 } else if (S_ISREG(inode->i_mode)) {
2972 p->bdev = inode->i_sb->s_bdev;
3009 struct inode *inode)
3063 swapfilepages = i_size_read(inode) >> PAGE_SHIFT;
3068 if (swap_header->info.nr_badpages && S_ISREG(inode->i_mode))
3194 struct inode *inode = NULL;
3227 inode = mapping->host;
3229 error = claim_swapfile(p, inode);
3233 inode_lock(inode);
3234 if (IS_SWAPFILE(inode)) {
3253 maxpages = read_swap_header(p, swap_header, inode);
3371 inode->i_flags |= S_SWAPFILE;
3372 error = inode_drain_writes(inode);
3374 inode->i_flags &= ~S_SWAPFILE;
3403 inode_unlock(inode);
3409 if (inode && S_ISBLK(inode->i_mode) && p->bdev) {
3413 inode = NULL;
3434 if (inode)
3435 inode_unlock(inode);