]> git.baikalelectronics.ru Git - kernel.git/commit
GFS2: Fix incorrect invalidation for DIO/buffered I/O
authorSteven Whitehouse <swhiteho@redhat.com>
Wed, 18 Dec 2013 14:14:52 +0000 (14:14 +0000)
committerSteven Whitehouse <swhiteho@redhat.com>
Fri, 20 Dec 2013 10:41:21 +0000 (10:41 +0000)
commitdfd114bb87644d30025d9ead49dc913325c1b916
treeb9b52451fc269f124312b91d6da6a5c894f4e6b9
parent7abd3c001302fba832c3b4ded84f2459171a6ebb
GFS2: Fix incorrect invalidation for DIO/buffered I/O

In patch acd399dc265076e0f36a20c02929510747e6fb17 we allowed
local deferred locks to be granted against a cached exclusive
lock. That opened up a corner case which this patch now
fixes.

The solution to the problem is to check whether we have cached
pages each time we do direct I/O and if so to unmap, flush
and invalidate those pages. Since the glock state machine
normally does that for us, mostly the code will be a no-op.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
fs/gfs2/aops.c