hc
2023-12-09 b22da3d8526a935aa31e086e63f60ff3246cb61c
kernel/fs/coda/cnode.c
....@@ -8,8 +8,8 @@
88 #include <linux/time.h>
99
1010 #include <linux/coda.h>
11
-#include <linux/coda_psdev.h>
1211 #include <linux/pagemap.h>
12
+#include "coda_psdev.h"
1313 #include "coda_linux.h"
1414
1515 static inline int coda_fideq(struct CodaFid *fid1, struct CodaFid *fid2)
....@@ -137,11 +137,6 @@
137137 struct inode *inode;
138138 unsigned long hash = coda_f2i(fid);
139139
140
- if ( !sb ) {
141
- pr_warn("%s: no sb!\n", __func__);
142
- return NULL;
143
- }
144
-
145140 inode = ilookup5(sb, hash, coda_test_inode, fid);
146141 if ( !inode )
147142 return NULL;
....@@ -153,6 +148,16 @@
153148 return inode;
154149 }
155150
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
+
156161 /* the CONTROL inode is made without asking attributes from Venus */
157162 struct inode *coda_cnode_makectl(struct super_block *sb)
158163 {