aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ctree.h
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.cz>2011-05-31 12:07:27 -0400
committerChris Mason <chris.mason@oracle.com>2011-06-04 08:11:22 -0400
commit7841cb2898f66a73062c64d0ef5733dde7279e46 (patch)
treeb7a94d96d44971845951a59e9fb7b5c2e30c46b3 /fs/btrfs/ctree.h
parent4b9465cb9e3859186eefa1ca3b990a5849386320 (diff)
btrfs: add helper for fs_info->closing
wrap checking of filesystem 'closing' flag and fix a few missing memory barriers. Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r--fs/btrfs/ctree.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 4958ef5417d6..8490ee063709 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -2354,6 +2354,15 @@ int btrfs_drop_subtree(struct btrfs_trans_handle *trans,
2354 struct btrfs_root *root, 2354 struct btrfs_root *root,
2355 struct extent_buffer *node, 2355 struct extent_buffer *node,
2356 struct extent_buffer *parent); 2356 struct extent_buffer *parent);
2357static inline int btrfs_fs_closing(struct btrfs_fs_info *fs_info)
2358{
2359 /*
2360 * Get synced with close_ctree()
2361 */
2362 smp_mb();
2363 return fs_info->closing;
2364}
2365
2357/* root-item.c */ 2366/* root-item.c */
2358int btrfs_find_root_ref(struct btrfs_root *tree_root, 2367int btrfs_find_root_ref(struct btrfs_root *tree_root,
2359 struct btrfs_path *path, 2368 struct btrfs_path *path,