aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/file.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-01-09 20:31:38 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-09 20:31:38 -0500
commit80c0531514516e43ae118ddf38424e06e5c3cb3c (patch)
tree2eef8cf8fdf505b18f83078d1eb41167e98f5b54 /fs/ocfs2/file.c
parenta457aa6c2bdd743bbbffd3f9e4fdbd8c71f8af1b (diff)
parent11b751ae8c8ca3fa24c85bd5a3e51dd9f95cda17 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/mingo/mutex-2.6
Diffstat (limited to 'fs/ocfs2/file.c')
-rw-r--r--fs/ocfs2/file.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c
index 72ae9e3306f4..ca5f9f90d794 100644
--- a/fs/ocfs2/file.c
+++ b/fs/ocfs2/file.c
@@ -492,7 +492,7 @@ restart_all:
492 } 492 }
493 493
494 /* blocks peope in read/write from reading our allocation 494 /* blocks peope in read/write from reading our allocation
495 * until we're done changing it. We depend on i_sem to block 495 * until we're done changing it. We depend on i_mutex to block
496 * other extend/truncate calls while we're here. Ordering wrt 496 * other extend/truncate calls while we're here. Ordering wrt
497 * start_trans is important here -- always do it before! */ 497 * start_trans is important here -- always do it before! */
498 down_write(&OCFS2_I(inode)->ip_alloc_sem); 498 down_write(&OCFS2_I(inode)->ip_alloc_sem);
@@ -958,8 +958,8 @@ static ssize_t ocfs2_file_aio_write(struct kiocb *iocb,
958 filp->f_flags &= ~O_DIRECT; 958 filp->f_flags &= ~O_DIRECT;
959#endif 959#endif
960 960
961 down(&inode->i_sem); 961 mutex_lock(&inode->i_mutex);
962 /* to match setattr's i_sem -> i_alloc_sem -> rw_lock ordering */ 962 /* to match setattr's i_mutex -> i_alloc_sem -> rw_lock ordering */
963 if (filp->f_flags & O_DIRECT) { 963 if (filp->f_flags & O_DIRECT) {
964 have_alloc_sem = 1; 964 have_alloc_sem = 1;
965 down_read(&inode->i_alloc_sem); 965 down_read(&inode->i_alloc_sem);
@@ -1123,7 +1123,7 @@ out:
1123 up_read(&inode->i_alloc_sem); 1123 up_read(&inode->i_alloc_sem);
1124 if (rw_level != -1) 1124 if (rw_level != -1)
1125 ocfs2_rw_unlock(inode, rw_level); 1125 ocfs2_rw_unlock(inode, rw_level);
1126 up(&inode->i_sem); 1126 mutex_unlock(&inode->i_mutex);
1127 1127
1128 mlog_exit(ret); 1128 mlog_exit(ret);
1129 return ret; 1129 return ret;