aboutsummaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/xfs/xfs_vnodeops.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c
index 35ac59dabf8..40b95e3a88b 100644
--- a/fs/xfs/xfs_vnodeops.c
+++ b/fs/xfs/xfs_vnodeops.c
@@ -3437,7 +3437,9 @@ xfs_rwunlock(
{
if (S_ISDIR(ip->i_d.di_mode))
return;
- if (locktype != VRWLOCK_WRITE) {
+ if (locktype == VRWLOCK_WRITE) {
+ xfs_iunlock(ip, XFS_IOLOCK_EXCL);
+ } else {
ASSERT((locktype == VRWLOCK_READ) ||
(locktype == VRWLOCK_WRITE_DIRECT));
xfs_iunlock(ip, XFS_IOLOCK_SHARED);