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/ufs | |
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/ufs')
-rw-r--r-- | fs/ufs/super.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/ufs/super.c b/fs/ufs/super.c index 2ba11a9aa995..e9a42c711a9e 100644 --- a/fs/ufs/super.c +++ b/fs/ufs/super.c | |||
@@ -1275,7 +1275,7 @@ static ssize_t ufs_quota_write(struct super_block *sb, int type, | |||
1275 | size_t towrite = len; | 1275 | size_t towrite = len; |
1276 | struct buffer_head *bh; | 1276 | struct buffer_head *bh; |
1277 | 1277 | ||
1278 | down(&inode->i_sem); | 1278 | mutex_lock(&inode->i_mutex); |
1279 | while (towrite > 0) { | 1279 | while (towrite > 0) { |
1280 | tocopy = sb->s_blocksize - offset < towrite ? | 1280 | tocopy = sb->s_blocksize - offset < towrite ? |
1281 | sb->s_blocksize - offset : towrite; | 1281 | sb->s_blocksize - offset : towrite; |
@@ -1297,7 +1297,7 @@ static ssize_t ufs_quota_write(struct super_block *sb, int type, | |||
1297 | } | 1297 | } |
1298 | out: | 1298 | out: |
1299 | if (len == towrite) { | 1299 | if (len == towrite) { |
1300 | up(&inode->i_sem); | 1300 | mutex_unlock(&inode->i_mutex); |
1301 | return err; | 1301 | return err; |
1302 | } | 1302 | } |
1303 | if (inode->i_size < off+len-towrite) | 1303 | if (inode->i_size < off+len-towrite) |
@@ -1305,7 +1305,7 @@ out: | |||
1305 | inode->i_version++; | 1305 | inode->i_version++; |
1306 | inode->i_mtime = inode->i_ctime = CURRENT_TIME_SEC; | 1306 | inode->i_mtime = inode->i_ctime = CURRENT_TIME_SEC; |
1307 | mark_inode_dirty(inode); | 1307 | mark_inode_dirty(inode); |
1308 | up(&inode->i_sem); | 1308 | mutex_unlock(&inode->i_mutex); |
1309 | return len - towrite; | 1309 | return len - towrite; |
1310 | } | 1310 | } |
1311 | 1311 | ||