diff options
Diffstat (limited to 'fs/ntfs/bitmap.c')
-rw-r--r-- | fs/ntfs/bitmap.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/ntfs/bitmap.c b/fs/ntfs/bitmap.c index 0809cf876098..ec130c588d2b 100644 --- a/fs/ntfs/bitmap.c +++ b/fs/ntfs/bitmap.c | |||
@@ -67,8 +67,8 @@ int __ntfs_bitmap_set_bits_in_run(struct inode *vi, const s64 start_bit, | |||
67 | * Calculate the indices for the pages containing the first and last | 67 | * Calculate the indices for the pages containing the first and last |
68 | * bits, i.e. @start_bit and @start_bit + @cnt - 1, respectively. | 68 | * bits, i.e. @start_bit and @start_bit + @cnt - 1, respectively. |
69 | */ | 69 | */ |
70 | index = start_bit >> (3 + PAGE_CACHE_SHIFT); | 70 | index = start_bit >> (3 + PAGE_SHIFT); |
71 | end_index = (start_bit + cnt - 1) >> (3 + PAGE_CACHE_SHIFT); | 71 | end_index = (start_bit + cnt - 1) >> (3 + PAGE_SHIFT); |
72 | 72 | ||
73 | /* Get the page containing the first bit (@start_bit). */ | 73 | /* Get the page containing the first bit (@start_bit). */ |
74 | mapping = vi->i_mapping; | 74 | mapping = vi->i_mapping; |
@@ -82,7 +82,7 @@ int __ntfs_bitmap_set_bits_in_run(struct inode *vi, const s64 start_bit, | |||
82 | kaddr = page_address(page); | 82 | kaddr = page_address(page); |
83 | 83 | ||
84 | /* Set @pos to the position of the byte containing @start_bit. */ | 84 | /* Set @pos to the position of the byte containing @start_bit. */ |
85 | pos = (start_bit >> 3) & ~PAGE_CACHE_MASK; | 85 | pos = (start_bit >> 3) & ~PAGE_MASK; |
86 | 86 | ||
87 | /* Calculate the position of @start_bit in the first byte. */ | 87 | /* Calculate the position of @start_bit in the first byte. */ |
88 | bit = start_bit & 7; | 88 | bit = start_bit & 7; |
@@ -108,7 +108,7 @@ int __ntfs_bitmap_set_bits_in_run(struct inode *vi, const s64 start_bit, | |||
108 | * Depending on @value, modify all remaining whole bytes in the page up | 108 | * Depending on @value, modify all remaining whole bytes in the page up |
109 | * to @cnt. | 109 | * to @cnt. |
110 | */ | 110 | */ |
111 | len = min_t(s64, cnt >> 3, PAGE_CACHE_SIZE - pos); | 111 | len = min_t(s64, cnt >> 3, PAGE_SIZE - pos); |
112 | memset(kaddr + pos, value ? 0xff : 0, len); | 112 | memset(kaddr + pos, value ? 0xff : 0, len); |
113 | cnt -= len << 3; | 113 | cnt -= len << 3; |
114 | 114 | ||
@@ -132,7 +132,7 @@ int __ntfs_bitmap_set_bits_in_run(struct inode *vi, const s64 start_bit, | |||
132 | * Depending on @value, modify all remaining whole bytes in the | 132 | * Depending on @value, modify all remaining whole bytes in the |
133 | * page up to @cnt. | 133 | * page up to @cnt. |
134 | */ | 134 | */ |
135 | len = min_t(s64, cnt >> 3, PAGE_CACHE_SIZE); | 135 | len = min_t(s64, cnt >> 3, PAGE_SIZE); |
136 | memset(kaddr, value ? 0xff : 0, len); | 136 | memset(kaddr, value ? 0xff : 0, len); |
137 | cnt -= len << 3; | 137 | cnt -= len << 3; |
138 | } | 138 | } |