Root/
1 | #ifndef _LINUX_FS_STRUCT_H |
2 | #define _LINUX_FS_STRUCT_H |
3 | |
4 | #include <linux/path.h> |
5 | #include <linux/spinlock.h> |
6 | #include <linux/seqlock.h> |
7 | |
8 | struct fs_struct { |
9 | int users; |
10 | spinlock_t lock; |
11 | seqcount_t seq; |
12 | int umask; |
13 | int in_exec; |
14 | struct path root, pwd; |
15 | }; |
16 | |
17 | extern struct kmem_cache *fs_cachep; |
18 | |
19 | extern void exit_fs(struct task_struct *); |
20 | extern void set_fs_root(struct fs_struct *, struct path *); |
21 | extern void set_fs_pwd(struct fs_struct *, struct path *); |
22 | extern struct fs_struct *copy_fs_struct(struct fs_struct *); |
23 | extern void free_fs_struct(struct fs_struct *); |
24 | extern void daemonize_fs_struct(void); |
25 | extern int unshare_fs_struct(void); |
26 | |
27 | static inline void get_fs_root(struct fs_struct *fs, struct path *root) |
28 | { |
29 | spin_lock(&fs->lock); |
30 | *root = fs->root; |
31 | path_get(root); |
32 | spin_unlock(&fs->lock); |
33 | } |
34 | |
35 | static inline void get_fs_pwd(struct fs_struct *fs, struct path *pwd) |
36 | { |
37 | spin_lock(&fs->lock); |
38 | *pwd = fs->pwd; |
39 | path_get(pwd); |
40 | spin_unlock(&fs->lock); |
41 | } |
42 | |
43 | static inline void get_fs_root_and_pwd(struct fs_struct *fs, struct path *root, |
44 | struct path *pwd) |
45 | { |
46 | spin_lock(&fs->lock); |
47 | *root = fs->root; |
48 | path_get(root); |
49 | *pwd = fs->pwd; |
50 | path_get(pwd); |
51 | spin_unlock(&fs->lock); |
52 | } |
53 | |
54 | #endif /* _LINUX_FS_STRUCT_H */ |
55 |
Branches:
ben-wpan
ben-wpan-stefan
javiroman/ks7010
jz-2.6.34
jz-2.6.34-rc5
jz-2.6.34-rc6
jz-2.6.34-rc7
jz-2.6.35
jz-2.6.36
jz-2.6.37
jz-2.6.38
jz-2.6.39
jz-3.0
jz-3.1
jz-3.11
jz-3.12
jz-3.13
jz-3.15
jz-3.16
jz-3.18-dt
jz-3.2
jz-3.3
jz-3.4
jz-3.5
jz-3.6
jz-3.6-rc2-pwm
jz-3.9
jz-3.9-clk
jz-3.9-rc8
jz47xx
jz47xx-2.6.38
master
Tags:
od-2011-09-04
od-2011-09-18
v2.6.34-rc5
v2.6.34-rc6
v2.6.34-rc7
v3.9