From: Lachlan McIlroy Date: Thu, 6 Mar 2008 02:43:27 +0000 (+1100) Subject: [XFS] Fix regression due to refcache removal X-Git-Tag: v2.6.26-rc1~1147^2~83 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e9a56b7cdaf6129892fd7c8d950b71a1a4304bb0;p=linux-2.6 [XFS] Fix regression due to refcache removal SGI-PV: 971186 SGI-Modid: xfs-linux-melb:xfs-kern:30490a Signed-off-by: Lachlan McIlroy Signed-off-by: Donald Douwsma --- diff --git a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c index 35ac59dabf..40b95e3a88 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);