.. | .. |
---|
8 | 8 | #include <linux/time.h> |
---|
9 | 9 | |
---|
10 | 10 | #include <linux/coda.h> |
---|
11 | | -#include <linux/coda_psdev.h> |
---|
12 | 11 | #include <linux/pagemap.h> |
---|
| 12 | +#include "coda_psdev.h" |
---|
13 | 13 | #include "coda_linux.h" |
---|
14 | 14 | |
---|
15 | 15 | static inline int coda_fideq(struct CodaFid *fid1, struct CodaFid *fid2) |
---|
.. | .. |
---|
137 | 137 | struct inode *inode; |
---|
138 | 138 | unsigned long hash = coda_f2i(fid); |
---|
139 | 139 | |
---|
140 | | - if ( !sb ) { |
---|
141 | | - pr_warn("%s: no sb!\n", __func__); |
---|
142 | | - return NULL; |
---|
143 | | - } |
---|
144 | | - |
---|
145 | 140 | inode = ilookup5(sb, hash, coda_test_inode, fid); |
---|
146 | 141 | if ( !inode ) |
---|
147 | 142 | return NULL; |
---|
.. | .. |
---|
153 | 148 | return inode; |
---|
154 | 149 | } |
---|
155 | 150 | |
---|
| 151 | +struct coda_file_info *coda_ftoc(struct file *file) |
---|
| 152 | +{ |
---|
| 153 | + struct coda_file_info *cfi = file->private_data; |
---|
| 154 | + |
---|
| 155 | + BUG_ON(!cfi || cfi->cfi_magic != CODA_MAGIC); |
---|
| 156 | + |
---|
| 157 | + return cfi; |
---|
| 158 | + |
---|
| 159 | +} |
---|
| 160 | + |
---|
156 | 161 | /* the CONTROL inode is made without asking attributes from Venus */ |
---|
157 | 162 | struct inode *coda_cnode_makectl(struct super_block *sb) |
---|
158 | 163 | { |
---|