diff options
author | Alex Elder <elder@inktank.com> | 2013-02-04 11:13:11 -0500 |
---|---|---|
committer | Ben Myers <bpm@sgi.com> | 2013-02-07 10:39:48 -0500 |
commit | 311f08acde635e4e5ccea9b9d8c856cc2e0ced95 (patch) | |
tree | 8da8990b565b1d8c269ba20bf964d9115ac619cc /fs/xfs/xfs_inode.h | |
parent | a21cd503678286c56b1d0cca1c99349a4aa042f4 (diff) |
xfs: memory barrier before wake_up_bit()
In xfs_ifunlock() there is a call to wake_up_bit() after clearing
the flush lock on the xfs inode. This is not guaranteed to be safe,
as noted in the comments above wake_up_bit() beginning with:
In order for this to function properly, as it uses
waitqueue_active() internally, some kind of memory
barrier must be done prior to calling this.
Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_inode.h')
-rw-r--r-- | fs/xfs/xfs_inode.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/xfs/xfs_inode.h b/fs/xfs/xfs_inode.h index 22baf6ea4fac..237e7f6f2ab3 100644 --- a/fs/xfs/xfs_inode.h +++ b/fs/xfs/xfs_inode.h | |||
@@ -419,6 +419,7 @@ static inline void xfs_iflock(struct xfs_inode *ip) | |||
419 | static inline void xfs_ifunlock(struct xfs_inode *ip) | 419 | static inline void xfs_ifunlock(struct xfs_inode *ip) |
420 | { | 420 | { |
421 | xfs_iflags_clear(ip, XFS_IFLOCK); | 421 | xfs_iflags_clear(ip, XFS_IFLOCK); |
422 | smp_mb(); | ||
422 | wake_up_bit(&ip->i_flags, __XFS_IFLOCK_BIT); | 423 | wake_up_bit(&ip->i_flags, __XFS_IFLOCK_BIT); |
423 | } | 424 | } |
424 | 425 | ||