fs_struct.h 660 字节
Newer Older
L
Linus Torvalds 已提交
1 2 3
#ifndef _LINUX_FS_STRUCT_H
#define _LINUX_FS_STRUCT_H

J
Jan Blunck 已提交
4
#include <linux/path.h>
L
Linus Torvalds 已提交
5 6 7 8 9

struct fs_struct {
	atomic_t count;
	rwlock_t lock;
	int umask;
J
Jan Blunck 已提交
10
	struct path root, pwd, altroot;
L
Linus Torvalds 已提交
11 12 13 14 15 16 17 18
};

#define INIT_FS {				\
	.count		= ATOMIC_INIT(1),	\
	.lock		= RW_LOCK_UNLOCKED,	\
	.umask		= 0022, \
}

19 20
extern struct kmem_cache *fs_cachep;

L
Linus Torvalds 已提交
21 22
extern void exit_fs(struct task_struct *);
extern void set_fs_altroot(void);
23 24
extern void set_fs_root(struct fs_struct *, struct path *);
extern void set_fs_pwd(struct fs_struct *, struct path *);
L
Linus Torvalds 已提交
25 26 27 28
extern struct fs_struct *copy_fs_struct(struct fs_struct *);
extern void put_fs_struct(struct fs_struct *);

#endif /* _LINUX_FS_STRUCT_H */