ChenXiaoSong
6f52d4cda0
NFSv4: fix open failure with O_ACCMODE flag
...
[ Upstream commit b243874f6f9568b2daf1a00e9222cacdc15e159c ]
open() with O_ACCMODE|O_DIRECT flags secondly will fail.
Reproducer:
1. mount -t nfs -o vers=4.2 $server_ip:/ /mnt/
2. fd = open("/mnt/file", O_ACCMODE|O_DIRECT|O_CREAT)
3. close(fd)
4. fd = open("/mnt/file", O_ACCMODE|O_DIRECT)
Server nfsd4_decode_share_access() will fail with error nfserr_bad_xdr when
client use incorrect share access mode of 0.
Fix this by using NFS4_SHARE_ACCESS_BOTH share access mode in client,
just like firstly opening.
Fixes: ce4ef7c0a8a05 ("NFS: Split out NFS v4 file operations")
Signed-off-by: ChenXiaoSong <chenxiaosong2@huawei.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-04-13 20:59:15 +02:00
..
2022-02-08 18:34:04 +01:00
2021-06-29 10:53:48 -07:00
2021-06-29 10:53:48 -07:00
2021-12-22 09:32:45 +01:00
2021-10-20 21:09:02 -04:00
2021-08-19 09:02:55 +09:00
2021-06-29 10:53:48 -07:00
2022-04-08 14:23:58 +02:00
2021-08-27 13:34:02 +01:00
2022-04-13 20:59:10 +02:00
2022-04-08 14:23:58 +02:00
2022-03-02 11:48:02 +01:00
2021-11-18 19:16:11 +01:00
2022-01-27 11:03:55 +01:00
2022-02-01 17:27:01 +01:00
2022-01-27 11:04:23 +01:00
2021-06-29 10:53:48 -07:00
2021-12-01 09:04:50 +01:00
2022-03-08 19:12:32 +01:00
2022-04-08 14:23:35 +02:00
2022-04-08 14:23:57 +02:00
2022-04-08 14:23:58 +02:00
2021-09-02 12:32:12 -07:00
2021-10-04 22:13:12 +01:00
2022-03-16 14:23:42 +01:00
2022-04-08 14:24:10 +02:00
2021-07-15 10:13:49 -07:00
2021-07-01 11:06:06 -07:00
2021-08-26 22:28:02 +02:00
2021-07-27 11:00:36 +02:00
2022-03-08 19:12:38 +01:00
2021-12-01 09:04:44 +01:00
2021-11-12 15:05:50 +01:00
2022-03-08 19:12:32 +01:00
2022-04-08 14:22:53 +02:00
2022-04-13 20:59:13 +02:00
2021-10-04 10:27:18 +02:00
2022-02-23 12:03:18 +01:00
2022-02-05 12:38:57 +01:00
2022-04-13 20:59:10 +02:00
2021-12-29 12:28:59 +01:00
2022-04-13 20:59:15 +02:00
2021-10-04 22:02:17 +01:00
2022-04-08 14:23:57 +02:00
2021-09-08 12:55:35 -07:00
2022-02-05 12:38:59 +01:00
2022-04-08 14:23:58 +02:00
2021-10-15 09:58:11 -04:00
2022-04-08 14:22:56 +02:00
2021-06-29 10:53:48 -07:00
2022-01-20 09:13:13 +01:00
2022-02-05 12:38:59 +01:00
2022-04-08 14:24:12 +02:00
2022-04-08 14:23:01 +02:00
2021-09-21 08:36:48 -07:00
2022-02-23 12:03:06 +01:00
2021-06-29 10:53:48 -07:00
2021-09-03 15:33:47 -07:00
2021-12-14 10:57:12 +01:00
2021-08-16 10:50:32 -06:00
2021-08-06 13:05:28 +02:00
2021-06-29 10:53:48 -07:00
2022-03-02 11:48:05 +01:00
2022-04-08 14:24:08 +02:00
2022-02-01 17:27:00 +01:00
2021-08-19 09:02:55 +09:00
2021-09-27 11:26:21 -07:00
2021-09-22 10:56:34 -07:00
2022-01-11 15:35:16 +01:00
2021-12-22 09:32:48 +01:00
2021-12-14 10:57:22 +01:00
2021-11-25 09:48:46 +01:00
2021-08-18 22:08:24 +02:00
2021-09-05 10:15:05 -07:00
2022-04-08 14:24:17 +02:00
2022-04-08 14:24:18 +02:00
2021-06-29 10:53:50 -07:00
2022-04-08 14:22:54 +02:00
2022-04-08 14:24:18 +02:00
2021-09-02 10:07:29 -07:00
2021-08-31 11:13:35 -07:00
2021-09-03 09:58:10 -07:00
2021-09-06 07:20:56 -04:00
2021-09-09 13:25:49 -07:00
2022-04-08 14:23:01 +02:00
2021-09-03 10:08:28 -07:00
2022-04-08 14:23:54 +02:00
2021-08-23 01:25:40 -04:00
2022-01-20 09:13:14 +01:00
2021-09-07 16:07:47 -04:00
2021-09-03 10:08:28 -07:00
2021-11-25 09:49:08 +01:00
2021-09-07 08:39:40 -06:00
2022-04-08 14:24:12 +02:00
2021-12-22 09:32:51 +01:00
2021-08-29 07:55:55 -06:00
2021-08-31 11:06:32 -07:00
2021-09-12 10:10:21 -07:00
2021-07-25 22:33:03 -07:00
2021-10-18 20:22:03 -10:00
2021-06-29 10:53:48 -07:00
2021-09-07 11:21:48 -07:00
2021-09-12 10:10:21 -07:00
2022-02-01 17:27:15 +01:00
2022-01-05 12:42:39 +01:00
2021-11-18 19:17:17 +01:00
2022-03-16 14:23:44 +01:00
2021-08-18 22:08:24 +02:00
2021-08-24 07:52:45 -04:00
2021-08-23 06:15:36 -04:00
2022-01-29 10:58:25 +01:00
2021-07-19 17:18:48 -07:00
2021-12-14 10:57:15 +01:00
2021-08-17 11:47:43 +02:00
2022-02-23 12:03:05 +01:00
2021-08-10 17:57:22 +02:00
2021-10-18 20:22:02 -10:00