]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
ocfs2: change ip_unaligned_aio to of type mutex from atomit_t
authorWengang Wang <wen.gang.wang@oracle.com>
Thu, 3 Apr 2014 21:46:46 +0000 (14:46 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 3 Apr 2014 23:20:53 +0000 (16:20 -0700)
commitc18ceab01240fd4c354b78d877571b729908e4a3
treed9c0107c30019e3299fe1b712d2eebaf832e55ed
parent181a9a043b5424f2e6451297bbc27b196fe88475
ocfs2: change ip_unaligned_aio to of type mutex from atomit_t

There is a problem that waitqueue_active() may check stale data thus miss
a wakeup of threads waiting on ip_unaligned_aio.

The valid value of ip_unaligned_aio is only 0 and 1 so we can change it to
be of type mutex thus the above prolem is avoid.  Another benifit is that
mutex which works as FIFO is fairer than wake_up_all().

Signed-off-by: Wengang Wang <wen.gang.wang@oracle.com>
Cc: Mark Fasheh <mfasheh@suse.com>
Cc: Joel Becker <jlbec@evilplan.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/ocfs2/aops.c
fs/ocfs2/aops.h
fs/ocfs2/file.c
fs/ocfs2/inode.h
fs/ocfs2/super.c