diff options
author | Liu Hui <onlyflyer@gmail.com> | 2008-12-01 20:31:40 -0500 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2008-12-01 20:31:40 -0500 |
commit | ce397c0616de9bfb678569f1dfa655838a711594 (patch) | |
tree | 7268154f484cb442f25a5876697f211bef9dd7c5 /fs/btrfs | |
parent | ea6a478ed9758cb0f5af228104b9434840aa20ff (diff) |
Btrfs: Fix cow semantic in run_delalloc_nocow()
The file preallocation code reversed the logic to force nodatacow.
This fixes it.
Diffstat (limited to 'fs/btrfs')
-rw-r--r-- | fs/btrfs/inode.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 7a8ad4292f75..b3d4078b69a6 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c | |||
@@ -1114,10 +1114,10 @@ static int run_delalloc_range(struct inode *inode, struct page *locked_page, | |||
1114 | if (btrfs_test_opt(root, NODATACOW) || | 1114 | if (btrfs_test_opt(root, NODATACOW) || |
1115 | btrfs_test_flag(inode, NODATACOW)) | 1115 | btrfs_test_flag(inode, NODATACOW)) |
1116 | ret = run_delalloc_nocow(inode, locked_page, start, end, | 1116 | ret = run_delalloc_nocow(inode, locked_page, start, end, |
1117 | page_started, 0, nr_written); | 1117 | page_started, 1, nr_written); |
1118 | else if (btrfs_test_flag(inode, PREALLOC)) | 1118 | else if (btrfs_test_flag(inode, PREALLOC)) |
1119 | ret = run_delalloc_nocow(inode, locked_page, start, end, | 1119 | ret = run_delalloc_nocow(inode, locked_page, start, end, |
1120 | page_started, 1, nr_written); | 1120 | page_started, 0, nr_written); |
1121 | else | 1121 | else |
1122 | ret = cow_file_range_async(inode, locked_page, start, end, | 1122 | ret = cow_file_range_async(inode, locked_page, start, end, |
1123 | page_started, nr_written); | 1123 | page_started, nr_written); |