Trond Myklebust e547f26283 NFS: Fix another OPEN_DOWNGRADE bug
Olga Kornievskaia reports that the following test fails to trigger
an OPEN_DOWNGRADE on the wire, and only triggers the final CLOSE.

	fd0 = open(foo, RDRW)   -- should be open on the wire for "both"
	fd1 = open(foo, RDONLY)  -- should be open on the wire for "read"
	close(fd0) -- should trigger an open_downgrade
	read(fd1)
	close(fd1)

The issue is that we're missing a check for whether or not the current
state transitioned from an O_RDWR state as opposed to having transitioned
from a combination of O_RDONLY and O_WRONLY.

Reported-by: Olga Kornievskaia <aglo@umich.edu>
Fixes: cd9288ffaea4 ("NFSv4: Fix another bug in the close/open_downgrade code")
Cc: stable@vger.kernel.org # 2.6.33+
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
2016-06-28 16:55:34 -04:00
..
2016-06-24 12:01:00 -04:00
2016-06-24 12:01:00 -04:00
2016-05-17 15:47:55 -04:00
2015-04-23 15:16:14 -04:00
2012-07-30 19:06:41 -04:00
2015-02-03 11:06:34 -08:00
2016-03-31 00:30:15 -04:00
2016-05-17 15:47:55 -04:00
2015-04-23 15:16:14 -04:00
2016-06-28 16:55:34 -04:00
2015-04-23 15:16:14 -04:00
2016-05-17 15:48:06 -04:00
2016-05-17 15:47:55 -04:00
2016-05-26 10:33:33 -07:00
2016-05-17 15:47:55 -04:00
2012-07-30 19:06:52 -04:00
2016-05-09 11:39:45 -04:00
2016-05-17 15:47:55 -04:00
2016-06-24 12:01:00 -04:00
2016-05-09 11:39:45 -04:00