函数源码 |
Source File:include\linux\fs.h |
Create Date:2022-07-27 06:44:24 |
首页 | Copyright©Brick |
1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 | #else /* !CONFIG_FILE_LOCKING */ static inline int fcntl_getlk( struct file *file, unsigned int cmd, struct flock __user *user) { return -EINVAL; } static inline int fcntl_setlk(unsigned int fd, struct file *file, unsigned int cmd, struct flock __user *user) { return -EACCES; } #if BITS_PER_LONG == 32 static inline int fcntl_getlk64( struct file *file, unsigned int cmd, struct flock64 __user *user) { return -EINVAL; } static inline int fcntl_setlk64(unsigned int fd, struct file *file, unsigned int cmd, struct flock64 __user *user) { return -EACCES; } #endif static inline int fcntl_setlease(unsigned int fd, struct file *filp, long arg) { return -EINVAL; } static inline int fcntl_getlease( struct file *filp) { return F_UNLCK; } static inline void locks_free_lock_context( struct inode *inode) { } static inline void locks_init_lock( struct file_lock *fl) { return ; } static inline void locks_copy_conflock( struct file_lock * new , struct file_lock *fl) { return ; } static inline void locks_copy_lock( struct file_lock * new , struct file_lock *fl) { return ; } static inline void locks_remove_posix( struct file *filp, fl_owner_t owner) { return ; } static inline void locks_remove_file( struct file *filp) { return ; } static inline void posix_test_lock( struct file *filp, struct file_lock *fl) { return ; } static inline int posix_lock_file( struct file *filp, struct file_lock *fl, struct file_lock *conflock) { return -ENOLCK; } static inline int locks_delete_block( struct file_lock *waiter) { return -ENOENT; } static inline int vfs_test_lock( struct file *filp, struct file_lock *fl) { return 0; } static inline int vfs_lock_file( struct file *filp, unsigned int cmd, struct file_lock *fl, struct file_lock *conf) { return -ENOLCK; } static inline int vfs_cancel_lock( struct file *filp, struct file_lock *fl) { return 0; } static inline int locks_lock_inode_wait( struct inode *inode, struct file_lock *fl) { return -ENOLCK; } static inline int __break_lease( struct inode *inode, unsigned int mode, unsigned int type) { return 0; } static inline void lease_get_mtime( struct inode *inode, struct timespec64 * time ) { return ; } static inline int generic_setlease( struct file *filp, long arg, struct file_lock **flp, void **priv) { return -EINVAL; } static inline int vfs_setlease( struct file *filp, long arg, struct file_lock **lease, void **priv) { return -EINVAL; } static inline int lease_modify( struct file_lock *fl, int arg, struct list_head *dispose) { return -EINVAL; } struct files_struct; static inline void show_fd_locks( struct seq_file *f, struct file *filp, struct files_struct *files) {} #endif /* !CONFIG_FILE_LOCKING */ static inline struct inode *file_inode( const struct file *f) { return f->f_inode; } |