diff options
author | Jes Sorensen <jes@sgi.com> | 2006-01-09 18:59:24 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@hera.kernel.org> | 2006-01-09 18:59:24 -0500 |
commit | 1b1dcc1b57a49136f118a0f16367256ff9994a69 (patch) | |
tree | b0b36d4f41d28c9d6514fb309d33c1a084d6309b /fs/hfsplus/bitmap.c | |
parent | 794ee1baee1c26be40410233e6c20bceb2b03c08 (diff) |
[PATCH] mutex subsystem, semaphore to mutex: VFS, ->i_sem
This patch converts the inode semaphore to a mutex. I have tested it on
XFS and compiled as much as one can consider on an ia64. Anyway your
luck with it might be different.
Modified-by: Ingo Molnar <mingo@elte.hu>
(finished the conversion)
Signed-off-by: Jes Sorensen <jes@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'fs/hfsplus/bitmap.c')
-rw-r--r-- | fs/hfsplus/bitmap.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/hfsplus/bitmap.c b/fs/hfsplus/bitmap.c index c7d316455fa0..9fb51632303c 100644 --- a/fs/hfsplus/bitmap.c +++ b/fs/hfsplus/bitmap.c | |||
@@ -29,7 +29,7 @@ int hfsplus_block_allocate(struct super_block *sb, u32 size, u32 offset, u32 *ma | |||
29 | return size; | 29 | return size; |
30 | 30 | ||
31 | dprint(DBG_BITMAP, "block_allocate: %u,%u,%u\n", size, offset, len); | 31 | dprint(DBG_BITMAP, "block_allocate: %u,%u,%u\n", size, offset, len); |
32 | down(&HFSPLUS_SB(sb).alloc_file->i_sem); | 32 | mutex_lock(&HFSPLUS_SB(sb).alloc_file->i_mutex); |
33 | mapping = HFSPLUS_SB(sb).alloc_file->i_mapping; | 33 | mapping = HFSPLUS_SB(sb).alloc_file->i_mapping; |
34 | page = read_cache_page(mapping, offset / PAGE_CACHE_BITS, | 34 | page = read_cache_page(mapping, offset / PAGE_CACHE_BITS, |
35 | (filler_t *)mapping->a_ops->readpage, NULL); | 35 | (filler_t *)mapping->a_ops->readpage, NULL); |
@@ -143,7 +143,7 @@ done: | |||
143 | sb->s_dirt = 1; | 143 | sb->s_dirt = 1; |
144 | dprint(DBG_BITMAP, "-> %u,%u\n", start, *max); | 144 | dprint(DBG_BITMAP, "-> %u,%u\n", start, *max); |
145 | out: | 145 | out: |
146 | up(&HFSPLUS_SB(sb).alloc_file->i_sem); | 146 | mutex_unlock(&HFSPLUS_SB(sb).alloc_file->i_mutex); |
147 | return start; | 147 | return start; |
148 | } | 148 | } |
149 | 149 | ||
@@ -164,7 +164,7 @@ int hfsplus_block_free(struct super_block *sb, u32 offset, u32 count) | |||
164 | if ((offset + count) > HFSPLUS_SB(sb).total_blocks) | 164 | if ((offset + count) > HFSPLUS_SB(sb).total_blocks) |
165 | return -2; | 165 | return -2; |
166 | 166 | ||
167 | down(&HFSPLUS_SB(sb).alloc_file->i_sem); | 167 | mutex_lock(&HFSPLUS_SB(sb).alloc_file->i_mutex); |
168 | mapping = HFSPLUS_SB(sb).alloc_file->i_mapping; | 168 | mapping = HFSPLUS_SB(sb).alloc_file->i_mapping; |
169 | pnr = offset / PAGE_CACHE_BITS; | 169 | pnr = offset / PAGE_CACHE_BITS; |
170 | page = read_cache_page(mapping, pnr, (filler_t *)mapping->a_ops->readpage, NULL); | 170 | page = read_cache_page(mapping, pnr, (filler_t *)mapping->a_ops->readpage, NULL); |
@@ -215,7 +215,7 @@ out: | |||
215 | kunmap(page); | 215 | kunmap(page); |
216 | HFSPLUS_SB(sb).free_blocks += len; | 216 | HFSPLUS_SB(sb).free_blocks += len; |
217 | sb->s_dirt = 1; | 217 | sb->s_dirt = 1; |
218 | up(&HFSPLUS_SB(sb).alloc_file->i_sem); | 218 | mutex_unlock(&HFSPLUS_SB(sb).alloc_file->i_mutex); |
219 | 219 | ||
220 | return 0; | 220 | return 0; |
221 | } | 221 | } |