diff options
| author | Len Brown <len.brown@intel.com> | 2010-08-15 01:06:31 -0400 |
|---|---|---|
| committer | Len Brown <len.brown@intel.com> | 2010-08-15 01:06:31 -0400 |
| commit | 95ee46aa8698f2000647dfb362400fadbb5807cf (patch) | |
| tree | e5a05c7297f997e191c73091934e42e3195c0e40 /include/linux/fs_struct.h | |
| parent | cfa806f059801dbe7e435745eb2e187c8bfe1e7f (diff) | |
| parent | 92fa5bd9a946b6e7aab6764e7312e4e3d9bed295 (diff) | |
Merge branch 'linus' into release
Conflicts:
drivers/acpi/debug.c
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'include/linux/fs_struct.h')
| -rw-r--r-- | include/linux/fs_struct.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/include/linux/fs_struct.h b/include/linux/fs_struct.h index 78a05bfcd8eb..eca3d5202138 100644 --- a/include/linux/fs_struct.h +++ b/include/linux/fs_struct.h | |||
| @@ -21,4 +21,31 @@ extern void free_fs_struct(struct fs_struct *); | |||
| 21 | extern void daemonize_fs_struct(void); | 21 | extern void daemonize_fs_struct(void); |
| 22 | extern int unshare_fs_struct(void); | 22 | extern int unshare_fs_struct(void); |
| 23 | 23 | ||
| 24 | static inline void get_fs_root(struct fs_struct *fs, struct path *root) | ||
| 25 | { | ||
| 26 | read_lock(&fs->lock); | ||
| 27 | *root = fs->root; | ||
| 28 | path_get(root); | ||
| 29 | read_unlock(&fs->lock); | ||
| 30 | } | ||
| 31 | |||
| 32 | static inline void get_fs_pwd(struct fs_struct *fs, struct path *pwd) | ||
| 33 | { | ||
| 34 | read_lock(&fs->lock); | ||
| 35 | *pwd = fs->pwd; | ||
| 36 | path_get(pwd); | ||
| 37 | read_unlock(&fs->lock); | ||
| 38 | } | ||
| 39 | |||
| 40 | static inline void get_fs_root_and_pwd(struct fs_struct *fs, struct path *root, | ||
| 41 | struct path *pwd) | ||
| 42 | { | ||
| 43 | read_lock(&fs->lock); | ||
| 44 | *root = fs->root; | ||
| 45 | path_get(root); | ||
| 46 | *pwd = fs->pwd; | ||
| 47 | path_get(pwd); | ||
| 48 | read_unlock(&fs->lock); | ||
| 49 | } | ||
| 50 | |||
| 24 | #endif /* _LINUX_FS_STRUCT_H */ | 51 | #endif /* _LINUX_FS_STRUCT_H */ |
