diff options
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_lrw.c')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_lrw.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/fs/xfs/linux-2.6/xfs_lrw.c b/fs/xfs/linux-2.6/xfs_lrw.c index 279e9bc92aba..5675117ef227 100644 --- a/fs/xfs/linux-2.6/xfs_lrw.c +++ b/fs/xfs/linux-2.6/xfs_lrw.c | |||
@@ -254,7 +254,7 @@ xfs_read( | |||
254 | } | 254 | } |
255 | 255 | ||
256 | if (unlikely(ioflags & IO_ISDIRECT)) | 256 | if (unlikely(ioflags & IO_ISDIRECT)) |
257 | down(&inode->i_sem); | 257 | mutex_lock(&inode->i_mutex); |
258 | xfs_ilock(ip, XFS_IOLOCK_SHARED); | 258 | xfs_ilock(ip, XFS_IOLOCK_SHARED); |
259 | 259 | ||
260 | if (DM_EVENT_ENABLED(vp->v_vfsp, ip, DM_EVENT_READ) && | 260 | if (DM_EVENT_ENABLED(vp->v_vfsp, ip, DM_EVENT_READ) && |
@@ -286,7 +286,7 @@ xfs_read( | |||
286 | 286 | ||
287 | unlock_isem: | 287 | unlock_isem: |
288 | if (unlikely(ioflags & IO_ISDIRECT)) | 288 | if (unlikely(ioflags & IO_ISDIRECT)) |
289 | up(&inode->i_sem); | 289 | mutex_unlock(&inode->i_mutex); |
290 | return ret; | 290 | return ret; |
291 | } | 291 | } |
292 | 292 | ||
@@ -655,7 +655,7 @@ relock: | |||
655 | iolock = XFS_IOLOCK_EXCL; | 655 | iolock = XFS_IOLOCK_EXCL; |
656 | locktype = VRWLOCK_WRITE; | 656 | locktype = VRWLOCK_WRITE; |
657 | 657 | ||
658 | down(&inode->i_sem); | 658 | mutex_lock(&inode->i_mutex); |
659 | } else { | 659 | } else { |
660 | iolock = XFS_IOLOCK_SHARED; | 660 | iolock = XFS_IOLOCK_SHARED; |
661 | locktype = VRWLOCK_WRITE_DIRECT; | 661 | locktype = VRWLOCK_WRITE_DIRECT; |
@@ -686,7 +686,7 @@ start: | |||
686 | int dmflags = FILP_DELAY_FLAG(file); | 686 | int dmflags = FILP_DELAY_FLAG(file); |
687 | 687 | ||
688 | if (need_isem) | 688 | if (need_isem) |
689 | dmflags |= DM_FLAGS_ISEM; | 689 | dmflags |= DM_FLAGS_IMUX; |
690 | 690 | ||
691 | xfs_iunlock(xip, XFS_ILOCK_EXCL); | 691 | xfs_iunlock(xip, XFS_ILOCK_EXCL); |
692 | error = XFS_SEND_DATA(xip->i_mount, DM_EVENT_WRITE, vp, | 692 | error = XFS_SEND_DATA(xip->i_mount, DM_EVENT_WRITE, vp, |
@@ -772,7 +772,7 @@ retry: | |||
772 | if (need_isem) { | 772 | if (need_isem) { |
773 | /* demote the lock now the cached pages are gone */ | 773 | /* demote the lock now the cached pages are gone */ |
774 | XFS_ILOCK_DEMOTE(mp, io, XFS_IOLOCK_EXCL); | 774 | XFS_ILOCK_DEMOTE(mp, io, XFS_IOLOCK_EXCL); |
775 | up(&inode->i_sem); | 775 | mutex_unlock(&inode->i_mutex); |
776 | 776 | ||
777 | iolock = XFS_IOLOCK_SHARED; | 777 | iolock = XFS_IOLOCK_SHARED; |
778 | locktype = VRWLOCK_WRITE_DIRECT; | 778 | locktype = VRWLOCK_WRITE_DIRECT; |
@@ -817,14 +817,14 @@ retry: | |||
817 | 817 | ||
818 | xfs_rwunlock(bdp, locktype); | 818 | xfs_rwunlock(bdp, locktype); |
819 | if (need_isem) | 819 | if (need_isem) |
820 | up(&inode->i_sem); | 820 | mutex_unlock(&inode->i_mutex); |
821 | error = XFS_SEND_NAMESP(xip->i_mount, DM_EVENT_NOSPACE, vp, | 821 | error = XFS_SEND_NAMESP(xip->i_mount, DM_EVENT_NOSPACE, vp, |
822 | DM_RIGHT_NULL, vp, DM_RIGHT_NULL, NULL, NULL, | 822 | DM_RIGHT_NULL, vp, DM_RIGHT_NULL, NULL, NULL, |
823 | 0, 0, 0); /* Delay flag intentionally unused */ | 823 | 0, 0, 0); /* Delay flag intentionally unused */ |
824 | if (error) | 824 | if (error) |
825 | goto out_nounlocks; | 825 | goto out_nounlocks; |
826 | if (need_isem) | 826 | if (need_isem) |
827 | down(&inode->i_sem); | 827 | mutex_lock(&inode->i_mutex); |
828 | xfs_rwlock(bdp, locktype); | 828 | xfs_rwlock(bdp, locktype); |
829 | pos = xip->i_d.di_size; | 829 | pos = xip->i_d.di_size; |
830 | ret = 0; | 830 | ret = 0; |
@@ -926,7 +926,7 @@ retry: | |||
926 | 926 | ||
927 | xfs_rwunlock(bdp, locktype); | 927 | xfs_rwunlock(bdp, locktype); |
928 | if (need_isem) | 928 | if (need_isem) |
929 | up(&inode->i_sem); | 929 | mutex_unlock(&inode->i_mutex); |
930 | 930 | ||
931 | error = sync_page_range(inode, mapping, pos, ret); | 931 | error = sync_page_range(inode, mapping, pos, ret); |
932 | if (!error) | 932 | if (!error) |
@@ -938,7 +938,7 @@ retry: | |||
938 | xfs_rwunlock(bdp, locktype); | 938 | xfs_rwunlock(bdp, locktype); |
939 | out_unlock_isem: | 939 | out_unlock_isem: |
940 | if (need_isem) | 940 | if (need_isem) |
941 | up(&inode->i_sem); | 941 | mutex_unlock(&inode->i_mutex); |
942 | out_nounlocks: | 942 | out_nounlocks: |
943 | return -error; | 943 | return -error; |
944 | } | 944 | } |