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/buffer.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/buffer.c')
-rw-r--r-- | fs/buffer.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/buffer.c b/fs/buffer.c index 55f0975a9b15..6466bc8a3dc7 100644 --- a/fs/buffer.c +++ b/fs/buffer.c | |||
@@ -352,11 +352,11 @@ static long do_fsync(unsigned int fd, int datasync) | |||
352 | * We need to protect against concurrent writers, | 352 | * We need to protect against concurrent writers, |
353 | * which could cause livelocks in fsync_buffers_list | 353 | * which could cause livelocks in fsync_buffers_list |
354 | */ | 354 | */ |
355 | down(&mapping->host->i_sem); | 355 | mutex_lock(&mapping->host->i_mutex); |
356 | err = file->f_op->fsync(file, file->f_dentry, datasync); | 356 | err = file->f_op->fsync(file, file->f_dentry, datasync); |
357 | if (!ret) | 357 | if (!ret) |
358 | ret = err; | 358 | ret = err; |
359 | up(&mapping->host->i_sem); | 359 | mutex_unlock(&mapping->host->i_mutex); |
360 | err = filemap_fdatawait(mapping); | 360 | err = filemap_fdatawait(mapping); |
361 | if (!ret) | 361 | if (!ret) |
362 | ret = err; | 362 | ret = err; |
@@ -2338,7 +2338,7 @@ int generic_commit_write(struct file *file, struct page *page, | |||
2338 | __block_commit_write(inode,page,from,to); | 2338 | __block_commit_write(inode,page,from,to); |
2339 | /* | 2339 | /* |
2340 | * No need to use i_size_read() here, the i_size | 2340 | * No need to use i_size_read() here, the i_size |
2341 | * cannot change under us because we hold i_sem. | 2341 | * cannot change under us because we hold i_mutex. |
2342 | */ | 2342 | */ |
2343 | if (pos > inode->i_size) { | 2343 | if (pos > inode->i_size) { |
2344 | i_size_write(inode, pos); | 2344 | i_size_write(inode, pos); |