Whamcloud - gitweb
5bc3c4716992e7f31bbc239510b8b451900101b3
[fs/lustre-release.git] / lustre / include / linux / obd.h
1 /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
2  * vim:expandtab:shiftwidth=8:tabstop=8:
3  */
4
5 #ifndef __LINUX_OBD_H
6 #define __LINUX_OBD_H
7
8 #ifndef __OBD_H
9 #error Do not #include this file directly. #include <obd.h> instead
10 #endif
11
12 #ifdef __KERNEL__
13 # include <linux/fs.h>
14 # include <linux/list.h>
15 # include <linux/sched.h>  /* for struct task_struct, for current.h */
16 # include <asm/current.h>  /* for smp_lock.h */
17 # include <linux/smp_lock.h>
18 # include <linux/proc_fs.h>
19 # include <linux/mount.h>
20 # ifndef HAVE_VFS_INTENT_PATCHES
21 #  include <linux/lustre_intent.h>
22 # endif
23 #endif
24
25 typedef spinlock_t client_obd_lock_t;
26
27 static inline void client_obd_list_lock_init(client_obd_lock_t *lock)
28 {
29         spin_lock_init(lock);
30 }
31
32 static inline void client_obd_list_lock_done(client_obd_lock_t *lock)
33 {}
34
35 static inline void client_obd_list_lock(client_obd_lock_t *lock)
36 {
37         spin_lock(lock);
38 }
39
40 static inline void client_obd_list_unlock(client_obd_lock_t *lock)
41 {
42         spin_unlock(lock);
43 }
44
45 #endif /* __LINUX_OBD_H */