diff options
author | David Sterba <dsterba@suse.cz> | 2011-05-31 12:07:27 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2011-06-04 08:11:22 -0400 |
commit | 7841cb2898f66a73062c64d0ef5733dde7279e46 (patch) | |
tree | b7a94d96d44971845951a59e9fb7b5c2e30c46b3 /fs/btrfs/file.c | |
parent | 4b9465cb9e3859186eefa1ca3b990a5849386320 (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/file.c')
-rw-r--r-- | fs/btrfs/file.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index 982b5ea9762f..fa4ef18b66b1 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c | |||
@@ -129,7 +129,7 @@ int btrfs_add_inode_defrag(struct btrfs_trans_handle *trans, | |||
129 | if (!btrfs_test_opt(root, AUTO_DEFRAG)) | 129 | if (!btrfs_test_opt(root, AUTO_DEFRAG)) |
130 | return 0; | 130 | return 0; |
131 | 131 | ||
132 | if (root->fs_info->closing) | 132 | if (btrfs_fs_closing(root->fs_info)) |
133 | return 0; | 133 | return 0; |
134 | 134 | ||
135 | if (BTRFS_I(inode)->in_defrag) | 135 | if (BTRFS_I(inode)->in_defrag) |
@@ -229,7 +229,7 @@ int btrfs_run_defrag_inodes(struct btrfs_fs_info *fs_info) | |||
229 | first_ino = defrag->ino + 1; | 229 | first_ino = defrag->ino + 1; |
230 | rb_erase(&defrag->rb_node, &fs_info->defrag_inodes); | 230 | rb_erase(&defrag->rb_node, &fs_info->defrag_inodes); |
231 | 231 | ||
232 | if (fs_info->closing) | 232 | if (btrfs_fs_closing(fs_info)) |
233 | goto next_free; | 233 | goto next_free; |
234 | 234 | ||
235 | spin_unlock(&fs_info->defrag_inodes_lock); | 235 | spin_unlock(&fs_info->defrag_inodes_lock); |