diff options
author | Mark Fasheh <mark.fasheh@oracle.com> | 2006-01-10 18:41:43 -0500 |
---|---|---|
committer | Mark Fasheh <mark.fasheh@oracle.com> | 2006-02-03 16:47:19 -0500 |
commit | 251b6eccbeff4f0f8a3509769b327705e899f5dd (patch) | |
tree | 7da835c3bebc8150a1a1ae6abb681a1e1a9c5f36 /fs/ocfs2/buffer_head_io.c | |
parent | aee93ac4b7ad461255939248d0d51566cff77e05 (diff) |
[OCFS2] Make ip_io_sem a mutex
ip_io_sem is now ip_io_mutex.
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Diffstat (limited to 'fs/ocfs2/buffer_head_io.c')
-rw-r--r-- | fs/ocfs2/buffer_head_io.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/ocfs2/buffer_head_io.c b/fs/ocfs2/buffer_head_io.c index d424041b38e9..bae3d7548bea 100644 --- a/fs/ocfs2/buffer_head_io.c +++ b/fs/ocfs2/buffer_head_io.c | |||
@@ -58,7 +58,7 @@ int ocfs2_write_block(struct ocfs2_super *osb, struct buffer_head *bh, | |||
58 | goto out; | 58 | goto out; |
59 | } | 59 | } |
60 | 60 | ||
61 | down(&OCFS2_I(inode)->ip_io_sem); | 61 | mutex_lock(&OCFS2_I(inode)->ip_io_mutex); |
62 | 62 | ||
63 | lock_buffer(bh); | 63 | lock_buffer(bh); |
64 | set_buffer_uptodate(bh); | 64 | set_buffer_uptodate(bh); |
@@ -82,7 +82,7 @@ int ocfs2_write_block(struct ocfs2_super *osb, struct buffer_head *bh, | |||
82 | brelse(bh); | 82 | brelse(bh); |
83 | } | 83 | } |
84 | 84 | ||
85 | up(&OCFS2_I(inode)->ip_io_sem); | 85 | mutex_unlock(&OCFS2_I(inode)->ip_io_mutex); |
86 | out: | 86 | out: |
87 | mlog_exit(ret); | 87 | mlog_exit(ret); |
88 | return ret; | 88 | return ret; |
@@ -125,13 +125,13 @@ int ocfs2_read_blocks(struct ocfs2_super *osb, u64 block, int nr, | |||
125 | flags &= ~OCFS2_BH_CACHED; | 125 | flags &= ~OCFS2_BH_CACHED; |
126 | 126 | ||
127 | if (inode) | 127 | if (inode) |
128 | down(&OCFS2_I(inode)->ip_io_sem); | 128 | mutex_lock(&OCFS2_I(inode)->ip_io_mutex); |
129 | for (i = 0 ; i < nr ; i++) { | 129 | for (i = 0 ; i < nr ; i++) { |
130 | if (bhs[i] == NULL) { | 130 | if (bhs[i] == NULL) { |
131 | bhs[i] = sb_getblk(sb, block++); | 131 | bhs[i] = sb_getblk(sb, block++); |
132 | if (bhs[i] == NULL) { | 132 | if (bhs[i] == NULL) { |
133 | if (inode) | 133 | if (inode) |
134 | up(&OCFS2_I(inode)->ip_io_sem); | 134 | mutex_unlock(&OCFS2_I(inode)->ip_io_mutex); |
135 | status = -EIO; | 135 | status = -EIO; |
136 | mlog_errno(status); | 136 | mlog_errno(status); |
137 | goto bail; | 137 | goto bail; |
@@ -220,7 +220,7 @@ int ocfs2_read_blocks(struct ocfs2_super *osb, u64 block, int nr, | |||
220 | ocfs2_set_buffer_uptodate(inode, bh); | 220 | ocfs2_set_buffer_uptodate(inode, bh); |
221 | } | 221 | } |
222 | if (inode) | 222 | if (inode) |
223 | up(&OCFS2_I(inode)->ip_io_sem); | 223 | mutex_unlock(&OCFS2_I(inode)->ip_io_mutex); |
224 | 224 | ||
225 | mlog(ML_BH_IO, "block=(%"MLFu64"), nr=(%d), cached=%s\n", block, nr, | 225 | mlog(ML_BH_IO, "block=(%"MLFu64"), nr=(%d), cached=%s\n", block, nr, |
226 | (!(flags & OCFS2_BH_CACHED) || ignore_cache) ? "no" : "yes"); | 226 | (!(flags & OCFS2_BH_CACHED) || ignore_cache) ? "no" : "yes"); |