diff options
author | David Sterba <dsterba@suse.cz> | 2011-05-31 18:07:27 +0200 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2011-06-04 08:11:22 -0400 |
commit | 7841cb2898f66a73062c64d0ef5733dde7279e46 (patch) | |
tree | b7a94d96d44971845951a59e9fb7b5c2e30c46b3 /fs/btrfs/ctree.h | |
parent | 4b9465cb9e3859186eefa1ca3b990a5849386320 (diff) | |
download | blackbird-op-linux-7841cb2898f66a73062c64d0ef5733dde7279e46.tar.gz blackbird-op-linux-7841cb2898f66a73062c64d0ef5733dde7279e46.zip |
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.h | 9 |
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, struct btrfs_root *root, struct extent_buffer *node, struct extent_buffer *parent); +static inline int btrfs_fs_closing(struct btrfs_fs_info *fs_info) +{ + /* + * Get synced with close_ctree() + */ + smp_mb(); + return fs_info->closing; +} + /* root-item.c */ int btrfs_find_root_ref(struct btrfs_root *tree_root, struct btrfs_path *path, |